1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-08 20:25:46 +01:00

Closes issue 349.

This commit is contained in:
Kris Maglione
2011-02-03 19:34:57 -05:00
parent e3e7586aac
commit 6d5a7b0849
2 changed files with 6 additions and 3 deletions

View File

@@ -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();

View File

@@ -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);