mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-26 19:26:59 +03:00
mootools change break context menu
Fx.Tween in mootols 1.4.5 no longer sets visibility to hidden, so when the context menu dissapear, if you put the mouse in the space where the menu were showed is still there but with opacity to 0 and cannot click to nothing below that area So i emulated the old behaviour with OnComplete event. Additionally i changed the use of deprecated $empty
This commit is contained in:
parent
d5aa316613
commit
c928987313
1 changed files with 12 additions and 2 deletions
|
@ -27,7 +27,17 @@ var ContextMenu = new Class({
|
||||||
this.targets = $$(this.options.targets);
|
this.targets = $$(this.options.targets);
|
||||||
|
|
||||||
//fx
|
//fx
|
||||||
this.fx = new Fx.Tween(this.menu, { property: 'opacity', duration:this.options.fadeSpeed });
|
this.fx = new Fx.Tween(this.menu, {
|
||||||
|
property: 'opacity',
|
||||||
|
duration:this.options.fadeSpeed,
|
||||||
|
onComplete: function() {
|
||||||
|
if(this.getStyle('opacity')){
|
||||||
|
this.setStyle('visibility','visible');
|
||||||
|
}else{
|
||||||
|
this.setStyle('visibility','hidden');
|
||||||
|
}
|
||||||
|
}.bind(this.menu)
|
||||||
|
});
|
||||||
|
|
||||||
//hide and begin the listener
|
//hide and begin the listener
|
||||||
this.hide().startListener();
|
this.hide().startListener();
|
||||||
|
|
Loading…
Reference in a new issue