The :active pseudo-class isn't applied when the target element's display is set to none
Reported by
j4ja...@gmail.com,
Jun 10 2016
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2763.0 Safari/537.36 Example URL: https://jsfiddle.net/sw00txf4/ Steps to reproduce the problem: 1. Create a label associated with an input element. 2. Use the :active pseudo-class on the input element to trigger some obvious visual change on the page (in the jsfiddle example, changing the background color of the label). 3. Hide the input element by setting the display to none. 4. Click on the label and keep the mouse button held down. What is the expected behavior? I would expect the :active pseudo-class to apply, thus changing the background color of the label, for as long as the mouse button is held down. What went wrong? The :active pseudo-class doesn't seem to work when the input's display is set to none. Does it occur on multiple sites: N/A Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 53.0.2763.0 Channel: dev OS Version: 10.0 Flash Version: Shockwave Flash 22.0 r0 The :active pseudo-class does work if the input is hidden in other ways, for example by positioning it offscreen, or by setting its visibility to hidden. It only seems to fail when the display is set to none.
,
Jun 24 2016
,
Jun 27 2016
Would like to work on this. Added a patch at https://codereview.chromium.org/2095833003/
,
Jun 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/86a54a0ee007a875d44bc4aebb7a3ad5d0cfae69 commit 86a54a0ee007a875d44bc4aebb7a3ad5d0cfae69 Author: ramya.v <ramya.v@samsung.com> Date: Tue Jun 28 08:39:06 2016 :active pseudo class is not applied for element with display none. Handled for display none case. BUG= 619206 Review-Url: https://codereview.chromium.org/2095833003 Cr-Commit-Position: refs/heads/master@{#402425} [add] https://crrev.com/86a54a0ee007a875d44bc4aebb7a3ad5d0cfae69/third_party/WebKit/LayoutTests/fast/css/pseudo-active-display-none.html [add] https://crrev.com/86a54a0ee007a875d44bc4aebb7a3ad5d0cfae69/third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none-expected.html [add] https://crrev.com/86a54a0ee007a875d44bc4aebb7a3ad5d0cfae69/third_party/WebKit/LayoutTests/fast/css/pseudo-hover-active-display-none.html [modify] https://crrev.com/86a54a0ee007a875d44bc4aebb7a3ad5d0cfae69/third_party/WebKit/Source/core/dom/ContainerNode.cpp
,
Jun 28 2016
|
||||
►
Sign in to add a comment |
||||
Comment 1 by ssamanoori@chromium.org
, Jun 17 2016Labels: M-53 OS-Linux OS-Mac
Status: Untriaged (was: Unconfirmed)