Permalink
Browse files

Properly chech 'Log Events' menu item (related to issue 229)

  • Loading branch information...
1 parent b215928 commit 25b1e62c8eb9d6ee68444b5dae521619249bd82f @janodvarko janodvarko committed Apr 29, 2013
Showing with 8 additions and 4 deletions.
  1. +5 −3 extension/content/firebug/chrome/menu.js
  2. +3 −1 extension/content/firebug/console/eventMonitor.js
@@ -95,9 +95,6 @@ Menu.setItemIntoElement = function(element, item)
if (item.type == "checkbox" && !item.closemenu)
element.setAttribute("closemenu", "none");
- if (item.checked)
- element.setAttribute("checked", "true");
-
if (item.disabled)
element.setAttribute("disabled", "true");
@@ -139,6 +136,11 @@ Menu.setItemIntoElement = function(element, item)
element.setAttribute("iconic", "true");
}
+ // xxxHonza: must be done after 'type' == 'splitmenu' otherwise the menu-item
+ // is not checked (the check icon is not displayed from some reason).
+ if (item.checked)
+ element.setAttribute("checked", "true");
+
return element;
};
@@ -236,8 +236,10 @@ var EventMonitor = Obj.extend(Firebug.Module,
});
}
- function onCommand()
+ function onCommand(event)
{
+ Events.cancelEvent(event);
+
var checked = this.areEventsMonitored(elt, null, context, false);
this.toggleMonitorEvents(elt, null, !checked, context);
}

0 comments on commit 25b1e62

Please sign in to comment.