diff --git a/common/content/commandline.js b/common/content/commandline.js index 22e46b9d..546a927d 100644 --- a/common/content/commandline.js +++ b/common/content/commandline.js @@ -998,6 +998,7 @@ var CommandLine = Module("commandline", { }, cleanup: function () { + dactyl.unregisterObserver("events.doneFeeding", this.closure.onDoneFeeding); this.previewClear(); this.tabTimer.reset(); this.autocompleteTimer.reset(); diff --git a/common/content/events.js b/common/content/events.js index 9948e5aa..90e92f2b 100644 --- a/common/content/events.js +++ b/common/content/events.js @@ -599,7 +599,7 @@ var Events = Module("events", { } }; const TYPES = { - change: "", input: "", + change: "", input: "", submit: "", click: "Mouse", mousedown: "Mouse", mouseup: "Mouse", mouseover: "Mouse", mouseout: "Mouse", keypress: "Key", keyup: "Key", keydown: "Key" @@ -659,11 +659,13 @@ var Events = Module("events", { this.feedingEvent = extra; if (target instanceof Element) // This causes a crash on Gecko<2.0, it seems. - (target.ownerDocument || target.document || target).defaultView + return (target.ownerDocument || target.document || target).defaultView .QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils) .dispatchDOMEventViaPresShell(target, event, true); - else + else { target.dispatchEvent(event); + return !event.getPreventDefault(); + } } catch (e) { util.reportError(e);