Bug 966956 - don't call Australis' maybeAutoHidePanel from buttons themselves, r=Unfocused

This commit is contained in:
Gijs Kruitbosch 2014-02-03 13:18:33 +00:00
Родитель 7e8455fba7
Коммит e5ff8571b4
1 изменённых файлов: 1 добавлений и 7 удалений

Просмотреть файл

@ -1141,8 +1141,6 @@ let CustomizableUIInternal = {
LOG("handleWidgetCommand"); LOG("handleWidgetCommand");
if (aWidget.type == "button") { if (aWidget.type == "button") {
this.maybeAutoHidePanel(aEvent);
if (aWidget.onCommand) { if (aWidget.onCommand) {
try { try {
aWidget.onCommand.call(null, aEvent); aWidget.onCommand.call(null, aEvent);
@ -1164,10 +1162,6 @@ let CustomizableUIInternal = {
handleWidgetClick: function(aWidget, aNode, aEvent) { handleWidgetClick: function(aWidget, aNode, aEvent) {
LOG("handleWidgetClick"); LOG("handleWidgetClick");
if (aWidget.type == "button") {
this.maybeAutoHidePanel(aEvent);
}
if (aWidget.onClick) { if (aWidget.onClick) {
try { try {
aWidget.onClick.call(null, aEvent); aWidget.onClick.call(null, aEvent);
@ -1324,7 +1318,7 @@ let CustomizableUIInternal = {
let target = aEvent.originalTarget; let target = aEvent.originalTarget;
let closemenu = "auto"; let closemenu = "auto";
let widgetType = "button"; let widgetType = "button";
while (target.localName != "panel") { while (target.parentNode && target.localName != "panel") {
closemenu = target.getAttribute("closemenu"); closemenu = target.getAttribute("closemenu");
widgetType = target.getAttribute("widget-type"); widgetType = target.getAttribute("widget-type");
if (closemenu == "none" || closemenu == "single" || if (closemenu == "none" || closemenu == "single" ||