diff --git a/js/ui/backgroundMenu.js b/js/ui/backgroundMenu.js index b3dec1ce2..d9341f576 100644 --- a/js/ui/backgroundMenu.js +++ b/js/ui/backgroundMenu.js @@ -55,9 +55,14 @@ function addBackgroundMenu(actor, layoutManager) { }); actor.add_action(clickAction); + let grabOpBeginId = global.display.connect('grab-op-begin', function () { + clickAction.release(); + }); + actor.connect('destroy', function() { actor._backgroundMenu.destroy(); actor._backgroundMenu = null; actor._backgroundManager = null; + global.display.disconnect(grabOpBeginId); }); }