mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-13 17:25:45 +01:00
Remove onKeyUpOrDown handler, which doesn't explain its purpose well enough to survive. Fixes issue #76.
This commit is contained in:
@@ -76,9 +76,7 @@ const Events = Module("events", {
|
|||||||
this.addSessionListener(window, "DOMMenuBarActive", this.closure.onDOMMenuBarActive, true);
|
this.addSessionListener(window, "DOMMenuBarActive", this.closure.onDOMMenuBarActive, true);
|
||||||
this.addSessionListener(window, "DOMMenuBarInactive", this.closure.onDOMMenuBarInactive, true);
|
this.addSessionListener(window, "DOMMenuBarInactive", this.closure.onDOMMenuBarInactive, true);
|
||||||
this.addSessionListener(window, "focus", this.wrapListener(this.onFocus), true);
|
this.addSessionListener(window, "focus", this.wrapListener(this.onFocus), true);
|
||||||
this.addSessionListener(window, "keydown", this.wrapListener(this.onKeyUpOrDown), true);
|
|
||||||
this.addSessionListener(window, "keypress", this.wrapListener(this.onKeyPress), true);
|
this.addSessionListener(window, "keypress", this.wrapListener(this.onKeyPress), true);
|
||||||
this.addSessionListener(window, "keyup", this.wrapListener(this.onKeyUpOrDown), true);
|
|
||||||
this.addSessionListener(window, "mousedown", this.wrapListener(this.onMouseDown), true);
|
this.addSessionListener(window, "mousedown", this.wrapListener(this.onMouseDown), true);
|
||||||
this.addSessionListener(window, "popuphidden", this.closure.onPopupHidden, true);
|
this.addSessionListener(window, "popuphidden", this.closure.onPopupHidden, true);
|
||||||
this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true);
|
this.addSessionListener(window, "popupshown", this.closure.onPopupShown, true);
|
||||||
@@ -574,7 +572,6 @@ const Events = Module("events", {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
waitForPageLoad: function () {
|
waitForPageLoad: function () {
|
||||||
//util.dump("start waiting in loaded state: " + buffer.loaded);
|
|
||||||
util.threadYield(true); // clear queue
|
util.threadYield(true); // clear queue
|
||||||
|
|
||||||
if (buffer.loaded == 1)
|
if (buffer.loaded == 1)
|
||||||
@@ -586,8 +583,6 @@ const Events = Module("events", {
|
|||||||
let now;
|
let now;
|
||||||
while (now = Date.now(), now < end) {
|
while (now = Date.now(), now < end) {
|
||||||
util.threadYield();
|
util.threadYield();
|
||||||
//if ((now - start) % 1000 < 10)
|
|
||||||
// util.dump("waited: " + (now - start) + " ms");
|
|
||||||
|
|
||||||
if (!events.feedingKeys)
|
if (!events.feedingKeys)
|
||||||
return false;
|
return false;
|
||||||
@@ -939,12 +934,6 @@ const Events = Module("events", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// this is need for sites like msn.com which focus the input field on keydown
|
|
||||||
onKeyUpOrDown: function onKeyUpOrDown(event) {
|
|
||||||
if (!Events.isInputElemFocused() && !modes.passThrough)
|
|
||||||
event.stopPropagation();
|
|
||||||
},
|
|
||||||
|
|
||||||
onMouseDown: function onMouseDown(event) {
|
onMouseDown: function onMouseDown(event) {
|
||||||
let elem = event.target;
|
let elem = event.target;
|
||||||
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
|
let win = elem.ownerDocument && elem.ownerDocument.defaultView || elem;
|
||||||
|
|||||||
Reference in New Issue
Block a user