Open
Bug 1138028
Opened 9 years ago
Updated 2 years ago
click on absolute element inside focusable element does not focus focusable element unless it has a CSS position
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Core
DOM: UI Events & Focus Handling
Tracking
()
UNCONFIRMED
People
(Reporter: jerome.louis.swing, Unassigned)
Details
(Keywords: reproducible, testcase)
Attachments
(1 file)
1.33 KB,
text/html
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.115 Safari/537.36 Steps to reproduce: Create a DIV element with a tabindex. Create another DIV element inside that first DIV, with absolute positionning. http://codepen.io/jlowcs/pen/bNKaaX Actual results: When inside DIV is clicked, the focus is not set to the outside DIV. Howerver, if a position is added to the outside DIV, the focus is set when the inside DIV is clicked. Expected results: The outside DIV should get the focus whether it has a CSS position or not.
Comment 1•9 years ago
|
||
Well it kind of makes sense given that only a positioned element (position != static) is a 'containing block' for the absolutely positioned element: http://www.w3.org/TR/CSS21/visuren.html#comp-abspos (This is more visual explanation: https://css-tricks.com/absolute-positioning-inside-relative-positioning/) I don't know which spec, if any, defines the focusing behavior in this much detail. ref the SO question from which this was filed: http://stackoverflow.com/q/28772810/1026
Component: Untriaged → Event Handling
Keywords: reproducible,
testcase
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Version: 36 Branch → Trunk
Comment 2•9 years ago
|
||
I can reproduce on OS X 10.9 on a current Nightly. Chrome works as reporter expects.
Comment 3•9 years ago
|
||
Jerome, sorry it took so long for this to be triaged and thanks for filing this report!
Comment 4•9 years ago
|
||
Here is a real-world use-case: https://jsfiddle.net/kc865xn1/ The placeholder should disappear when the box is clicked but it doesn't because of this bug. Setting the position of the ::before element, or that of .text to relative fixes the problem. I hope this bug gets fixed. Thanks.
Reporter | ||
Updated•8 years ago
|
OS: All → Windows 7
Hardware: All → x86_64
Reporter | ||
Updated•8 years ago
|
OS: Windows 7 → Unspecified
Hardware: x86_64 → Unspecified
Assignee | ||
Updated•5 years ago
|
Component: Event Handling → User events and focus handling
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•