diff --git a/content/treestyletab/treestyletab.js b/content/treestyletab/treestyletab.js index c836b506..989c54a9 100644 --- a/content/treestyletab/treestyletab.js +++ b/content/treestyletab/treestyletab.js @@ -1310,9 +1310,7 @@ catch(e) { event.initEvent('TreeStyleTabSubtreeClosing', true, true); event.parent = aParentTab; event.tabs = aClosedTabs; - this.ensureEventCancelable(event); - this.getTabBrowserFromChild(aParentTab).dispatchEvent(event); - return !event.getPreventDefault(); + return this.getTabBrowserFromChild(aParentTab).dispatchEvent(event); }, fireTabSubtreeClosedEvent : function TSTService_fireTabSubtreeClosedEvent(aTabBrowser, aParentTab, aClosedTabs) diff --git a/modules/utils.js b/modules/utils.js index 503e30a3..be23b0ea 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -412,22 +412,6 @@ var TreeStyleTabUtils = { // event - ensureEventCancelable : function(aEvent) - { - if (aEvent.getPreventDefault) return; - // getPreventDefault is available on any event on Gecko 1.9.2 or later. - // on Gecko 1.9.1 or before, UIEvents only have the method... - aEvent.__original__preventDefault = aEvent.preventDefault; - aEvent.__canceled = false; - aEvent.preventDefault = function() { - this.__original__preventDefault(); - this.__canceled = true; - }; - aEvent.getPreventDefault = function() { - return this.__canceled; - }; - }, - isNewTabAction : function TSTUtils_isNewTabAction(aEvent) { return aEvent.button == 1 || (aEvent.button == 0 && this.isAccelKeyPressed(aEvent));