diff --git a/src/webui/scripts/contextmenu.js b/src/webui/scripts/contextmenu.js index 41a3f08d7..8f32acc73 100644 --- a/src/webui/scripts/contextmenu.js +++ b/src/webui/scripts/contextmenu.js @@ -27,7 +27,17 @@ var ContextMenu = new Class({ this.targets = $$(this.options.targets); //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 this.hide().startListener(); @@ -158,4 +168,4 @@ var ContextMenu = new Class({ return this; } -}); \ No newline at end of file +});