mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 564170 - ctrlTab_advanceFocus incorrectly assumes the popupshown has been received if the panel's state is 'open'. r=enn
--HG-- extra : rebase_source : b27e0b98dee9c0f0dbf6cd848650245d1fe19ba2
This commit is contained in:
parent
28438f4b10
commit
739dddb997
@ -310,12 +310,14 @@ var ctrlTab = {
|
||||
},
|
||||
|
||||
advanceFocus: function ctrlTab_advanceFocus(aForward) {
|
||||
if (this.panel.state == "open") {
|
||||
if (this._selectedIndex == -1) {
|
||||
// No virtual selectedIndex, focus must be in the panel already.
|
||||
if (aForward)
|
||||
document.commandDispatcher.advanceFocus();
|
||||
else
|
||||
document.commandDispatcher.rewindFocus();
|
||||
} else {
|
||||
// Focus isn't in the panel yet, so we maintain a virtual selectedIndex.
|
||||
do {
|
||||
this._selectedIndex += aForward ? 1 : -1;
|
||||
if (this._selectedIndex < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user