Re: [css-ui-4] user-select inheriting into absolutely positioned elements

> 
> On 01 Jun 2015, at 17:41, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:
> 
> On 6/1/15 4:59 AM, Florian Rivoal wrote:
>> At the same time, the old behavior was probably introduced for a reason
> 
> Do you mean in Mozilla's implementation or in the spec?

I meant Mozilla. For (this part of) the spec, I was just following your implementation, assuming that if you had this kind of unconventional behavior, it would have been justified by use cases you had run into. Looks like I read too much into what is essentially a bug.

> In Mozilla's implementation it happened to be the simplest behavior: to figure out user-select for a box, just walk up its parent chain.  Due to the way absolutely positioned (and floated) things are taken out of flow in Gecko, their parent is their containing block, which may be an ancestor of the parent of the actual element being styled.  So the walk up the parent chain misses the user-select styles.
> 
> In other words, a naive implementation in Gecko, which does not bother to stop to think about the absolutely positioned case at all, leads to the "don't inherit into abspos" behavior.

I am not exactly sure why you'd do a pseudo inheritance via the box tree rather than classical inheritance via the DOM tree if you're not intentionally trying to go for this kind of side effect, but since this looks accidental, and you've removed it, and nobody else does it, I'll update the spec to match the consensus implementation.

 - Florian

Received on Monday, 1 June 2015 18:23:57 UTC