зеркало из https://github.com/mozilla/gecko-dev.git
Bug 836211 - Give focus to the downloads view if the previous view had focus.
r=mak
This commit is contained in:
Родитель
454b0ce43a
Коммит
88fd87f363
|
@ -1251,10 +1251,17 @@ let ContentArea = {
|
||||||
},
|
},
|
||||||
|
|
||||||
get currentView() PlacesUIUtils.getViewForNode(this._deck.selectedPanel),
|
get currentView() PlacesUIUtils.getViewForNode(this._deck.selectedPanel),
|
||||||
set currentView(aView) {
|
set currentView(aNewView) {
|
||||||
if (this.currentView != aView)
|
let oldView = this.currentView;
|
||||||
this._deck.selectedPanel = aView.associatedElement;
|
if (oldView != aNewView) {
|
||||||
return aView;
|
this._deck.selectedPanel = aNewView.associatedElement;
|
||||||
|
|
||||||
|
// If the content area inactivated view was focused, move focus
|
||||||
|
// to the new view.
|
||||||
|
if (document.activeElement == oldView.associatedElement)
|
||||||
|
aNewView.associatedElement.focus();
|
||||||
|
}
|
||||||
|
return aNewView;
|
||||||
},
|
},
|
||||||
|
|
||||||
get currentPlace() this.currentView.place,
|
get currentPlace() this.currentView.place,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче