| Index: lib/ui.js |
| =================================================================== |
| --- a/lib/ui.js |
| +++ b/lib/ui.js |
| @@ -708,16 +708,30 @@ let UI = exports.UI = |
| { |
| let {getBrowser} = require("appSupport"); |
| window.openDialog("chrome://adblockplus/content/ui/sendReport.xul", "_blank", "chrome,centerscreen,resizable=no", getBrowser(window).contentWindow, uri); |
| } |
| } |
| }, |
| /** |
| + * Closes icon's menu when a button is clicked to prevent ugly effects such |
| + * as https://bugzilla.mozilla.org/show_bug.cgi?id=940693. |
| + */ |
| + closeIconMenu: function(/**Window*/ window) |
| + { |
| + for each (let id in ["abp-toolbar-popup", "abp-status-popup"]) |
| + { |
| + let element = window.document.getElementById(id); |
| + if (element && element.state == "open") |
| + element.hidePopup(); |
| + } |
| + }, |
| + |
| + /** |
| * Opens our contribution page. |
| */ |
| openContributePage: function(/**Window*/ window) |
| { |
| this.loadDocLink("contribute", window); |
| }, |
| /** |
| @@ -2018,17 +2032,19 @@ let eventHandlers = [ |
| ["abp-command-toggleobjtabs", "command", UI.togglePref.bind(UI, "frameobjects")], |
| ["abp-command-togglecollapse", "command", UI.togglePref.bind(UI, "fastcollapse")], |
| ["abp-command-togglesavestats", "command", UI.toggleSaveStats.bind(UI)], |
| ["abp-command-togglesync", "command", UI.toggleSync.bind(UI)], |
| ["abp-command-toggleshowintoolbar", "command", UI.toggleToolbarIcon.bind(UI)], |
| ["abp-command-toggleshowinstatusbar", "command", UI.togglePref.bind(UI, "showinstatusbar")], |
| ["abp-command-enable", "command", UI.togglePref.bind(UI, "enabled")], |
| ["abp-command-contribute", "command", UI.openContributePage.bind(UI)], |
| - ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)] |
| + ["abp-command-contribute", "command", UI.closeIconMenu.bind(UI)], |
| + ["abp-command-contribute-hide", "command", UI.hideContributeButton.bind(UI)], |
| + ["abp-command-contribute-hide", "command", UI.closeIconMenu.bind(UI)] |
| ]; |
| onShutdown.add(function() |
| { |
| for (let window in UI.applicationWindows) |
| if (UI.isBottombarOpen(window)) |
| UI.toggleBottombar(window); |
| }); |