New issue
Advanced search Search tips

Issue 678123 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Blink treats the CSS "user-select" ("-webkit-user-select") property as inherited, when spec says it's not inherited

Project Member Reported by dholb...@gmail.com, Jan 4 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) Visit https://jsfiddle.net/3jf9uzpt/
(2) Look at the alert that appears

What is the expected result?
The alert should say "PASS" and show the child's "-webkit-user-select" value. (The child should not have inherited the parent's value).

What happens instead?
The alert says "FAIL - user-select incorrectly inherited to the child!"


Please use labels and text to provide additional information.
The user-select CSS property is defined here:
  https://drafts.csswg.org/css-ui-4/#content-selection
...which says "Inherited: no"

If you don't trust the alerts/JS in my testcase, feel free to just use devtools to inspect the computed style of #child. Chrome shows me that it's "none" (which is incorrect).
 
Cc: yoichio@chromium.org kojii@chromium.org
The jsfiddle doesn't look correct here. From the spec:
The computed value of auto is [...] if the computed value of user-select on the parent of this element is none, the computed value is none.

So given user-select is not explicitly set on the child, it would default to 'auto' and end up with the value 'none' anyway.

kojii@/yoichio@: Do you remember what happened here? Did we intend to fix this?

https://groups.google.com/a/chromium.org/forum/#!searchin/style-dev/user-select%7Csort:relevance/style-dev/-AiO0Bt5v8o/nVNQjjuHBwAJ
https://github.com/w3c/csswg-drafts/issues/336#issuecomment-246567000

Comment 2 by dholb...@gmail.com, Jan 4 2017

Oh, you're totally right. I didn't read the spec text about the "auto" value's special behavior -- just the "none" value and the blurb at the top about inheritance.

(*sigh*, this automagic behavior will require some special hacks to fully support in Gecko, I think.)

Thanks for clarifying! Feel free to close this as invalid, or whatever you deem appropriate.

Comment 3 by dholb...@gmail.com, Jan 4 2017

I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1328475 on fixing "auto" in Firefox/Gecko, btw.

Comment 4 by kojii@chromium.org, Jan 4 2017

Components: Blink>Editing
Labels: OS-All
Status: WontFix (was: Untriaged)
Thank you for raising the discussion, Daniel.

We were confused by this spec, filed https://github.com/w3c/csswg-drafts/issues/336 before, but then concluded to accept the current definition after 2 months of discussions.

yoichio@ should have a bug to align our behavior more to the spec, please feel free to ping us if you can't find such bugs, or anything else we could help you better.

Comment 5 by dholb...@gmail.com, Jan 4 2017

Thanks for the link to the github discussion -- that's some handy context.
FYI, here is issues around webkit-user-select:
  crbug.com/481985 ,  crbug.com/340671 ,  crbug.com/147490 

Sign in to add a comment