mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
WebUI: Don't show several context menus at the same time
This commit is contained in:
parent
d265d2e1a0
commit
fc077257d0
1 changed files with 4 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
var lastShownContexMenu = null;
|
||||||
var ContextMenu = new Class({
|
var ContextMenu = new Class({
|
||||||
//implements
|
//implements
|
||||||
Implements: [Options, Events],
|
Implements: [Options, Events],
|
||||||
|
@ -170,9 +171,12 @@ var ContextMenu = new Class({
|
||||||
|
|
||||||
//show menu
|
//show menu
|
||||||
show: function (trigger) {
|
show: function (trigger) {
|
||||||
|
if (lastShownContexMenu && lastShownContexMenu != this)
|
||||||
|
lastShownContexMenu.hide();
|
||||||
this.fx.start(1);
|
this.fx.start(1);
|
||||||
this.fireEvent('show');
|
this.fireEvent('show');
|
||||||
this.shown = true;
|
this.shown = true;
|
||||||
|
lastShownContexMenu = this;
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue