зеркало из https://github.com/mozilla/gecko-dev.git
Bug 991965 - Inhibit item selection and update commands when the DownloadsBlockedSubview is open. r=paolo
MozReview-Commit-ID: Akly0NenY8Z --HG-- extra : rebase_source : 0a02a747ec86e17a3218fdb00ed3ba018adc0a99
This commit is contained in:
Родитель
9647092161
Коммит
34e7abc036
|
@ -727,6 +727,11 @@ const DownloadsView = {
|
|||
*/
|
||||
contextMenuOpen: false,
|
||||
|
||||
/**
|
||||
* Indicates whether there is a DownloadsBlockedSubview open.
|
||||
*/
|
||||
subViewOpen: false,
|
||||
|
||||
/**
|
||||
* Indicates whether we are still loading downloads data asynchronously.
|
||||
*/
|
||||
|
@ -1032,14 +1037,14 @@ const DownloadsView = {
|
|||
* Mouse listeners to handle selection on hover.
|
||||
*/
|
||||
onDownloadMouseOver(aEvent) {
|
||||
if (!this.contextMenuOpen &&
|
||||
if (!(this.contextMenuOpen || this.subViewOpen) &&
|
||||
aEvent.target.parentNode == this.richListBox) {
|
||||
this.richListBox.selectedItem = aEvent.target;
|
||||
}
|
||||
},
|
||||
|
||||
onDownloadMouseOut(aEvent) {
|
||||
if (!this.contextMenuOpen &&
|
||||
if (!(this.contextMenuOpen || this.subViewOpen) &&
|
||||
aEvent.target.parentNode == this.richListBox) {
|
||||
// If the destination element is outside of the richlistitem, clear the
|
||||
// selection.
|
||||
|
@ -1671,6 +1676,8 @@ const DownloadsBlockedSubview = {
|
|||
|
||||
this.element = element;
|
||||
element.setAttribute("showingsubview", "true");
|
||||
DownloadsView.subViewOpen = true;
|
||||
DownloadsViewController.updateCommands();
|
||||
|
||||
let e = this.elements;
|
||||
let s = DownloadsCommon.strings;
|
||||
|
@ -1697,6 +1704,7 @@ const DownloadsBlockedSubview = {
|
|||
case "ViewHiding":
|
||||
this.subview.removeEventListener(event.type, this);
|
||||
this.element.removeAttribute("showingsubview");
|
||||
DownloadsView.subViewOpen = false;
|
||||
delete this.element;
|
||||
break;
|
||||
default:
|
||||
|
|
Загрузка…
Ссылка в новой задаче