зеркало из 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),
|
||||
set currentView(aView) {
|
||||
if (this.currentView != aView)
|
||||
this._deck.selectedPanel = aView.associatedElement;
|
||||
return aView;
|
||||
set currentView(aNewView) {
|
||||
let oldView = this.currentView;
|
||||
if (oldView != aNewView) {
|
||||
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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче