unbind before rebind, partial fix towards #2413 issue

This commit is contained in:
John McLear 2014-12-29 01:17:24 +01:00
parent 248d7655d7
commit 23570e80a7

View file

@ -149,6 +149,7 @@ var padeditbar = (function()
$("#editbar .editbarbutton").attr("unselectable", "on"); // for IE
$("#editbar").removeClass("disabledtoolbar").addClass("enabledtoolbar");
$("#editbar [data-key]").each(function () {
$(this).unbind("click");
(new ToolbarItem($(this))).bind(function (command, item) {
self.triggerCommand(command, item);
});