Closed Bug 755766 Opened 13 years ago Closed 13 years ago

scrollable elements get focus

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
trivial

Tracking

()

VERIFIED INVALID

People

(Reporter: streamcode9, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.46 Safari/536.5 Steps to reproduce: See example: http://jsfiddle.net/streamcode9/vgu6V/ Put cursor to the top input. Press TAB button 3 times. Actual results: The DIV element gets focus, in spite of it is not visible. Expected results: The DIV element should not get focus.
Are you able to reproduce this in latest-mozilla-central? ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central What about Chrome and IE?
Component: Untriaged → DOM
Product: Firefox → Core
QA Contact: untriaged → general
In Chrome and IE the DIV element does not get focus(expected result). Could not download latest-mozilla-central for testing.
OK, I have tested it in latest-mozilla-central. Issue exists!
I can reproduce this though I'm not sure this warrants the severity level "normal". Bumping this down to trivial as this does not appear to cause any loss of functionality. All you have to do is press TAB one more time to get to the text entry field. Can you please try previous Firefox releases to see if this regressed at some point? Previous releases can be found here: ftp://ftp.mozilla.org/pub/firefox/releases/
Severity: normal → trivial
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 7 → All
Hardware: x86_64 → All
Version: 12 Branch → Trunk
FireFox 11.0 has the same issue.
Does it happen on any version before Firefox 11? How far back does this problem go?
All previous
(In reply to streamcode9 from comment #7) > All previous Can you please be more specific?
(In reply to Anthony Hughes, Mozilla QA (irc: ashughes) from comment #8) > (In reply to streamcode9 from comment #7) > > All previous > > Can you please be more specific? All versions before Firefox 11.
There are a lot of versions "before Firefox 11". I find it hard to believe that you tested every single one. How far back did you go (ie. what's the earliest version you tested and reproduced this bug)?
Visibility (in the sense here: "positioned outside the viewport") has nothing to do with focus, in general. If you have a text input that's positioned off-screen, it'll be in the tab order. Why should a scrollable div be different? In Chrome, likewise, the scrollable div _never_ gets focus, whether it's "visible" or not. Which is broken for accessibility purposes, of course: you can't scroll it via keyboard. Anthony, we don't make any tabbing decisions based on position, so reporter is right: all versions of Firefox have behaved this way, ever since we started allowing tabbing to scrollable things. Marking invalid: the behavior is as designed. If you want things to not be in the tab order, you want to be using display:none instead of positioning hacks.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Summary: Invisible scrollable elements get focus → scrollable elements get focus
You could also use tabindex="-1".
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.