An absolutely positioned div with a tabindex causes the viewport to jump up when selecting text
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
Webcompat Priority | P3 |
People
(Reporter: twisniewski, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
4.32 KB,
text/html
|
Details |
When viewing the attached testcase in Firefox on Android, scrolling the page down a bit, and then long-tapping to select any word, the viewport suddenly jumps up and the wrong text ends up being selected. This only happens the first time this is attempted until the page is reloaded.
It seems to be related to the combination of having a tabindex
and absolute positioning on the div in the document, as removing any of the CSS of the tabindex seems to cause the problem to vanish in my testing.
I'm not certain if it's specific to Firefox on Android, as I don't have a desktop with a touchscreen, so I'm not sure if this issue would be better off in another bug component.
Updated•4 years ago
|
Comment 1•4 years ago
|
||
I cannot reproduce this on desktop (without touch screen). So I mark this bug on Android platform for now.
Comment 2•4 years ago
|
||
I cannot reproduce this on Android with the testcase in comment 0, but I can with the original URL.
This only happens the first time this is attempted until the page is reloaded.
This indicates something is off with the focus management when long-tapping to select a word. The first failed attempt should set the focus onto the element so that the subsequent long-tapping can success. That is why double tapping to select a word don't have this problem as Karl mentioned in this comment because the first tap sets the focus.
I believe currently we don't handle focus transfer into other document with long-tapping. That is, we cannot do a long-tapping to select a word in an unfocused <iframe>
. This bug may be related to this existing limitation (or bug).
Updated•4 years ago
|
Updated•3 years ago
|
Description
•