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:
Dão Gottwald 2010-05-07 09:50:04 +02:00
Родитель 28438f4b10
Коммит 739dddb997
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -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)