mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 00:45:47 +01:00
Fix error trapping in events.feedkeys.
--HG-- branch : bootstrapped
This commit is contained in:
@@ -410,6 +410,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
util.dump(elem);
|
||||
util.reportError(e);
|
||||
}
|
||||
if (services.focus.focusedWindow == null)
|
||||
util.dumpStack("focusedWindow == null");
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -455,6 +457,8 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
|
||||
if (elem && elem != dactyl.focusedElement)
|
||||
dactyl.focus(elem);
|
||||
if (services.focus.focusedWindow == null)
|
||||
util.dumpStack("focusedWindow == null");
|
||||
},
|
||||
|
||||
/** @property {Element} The currently focused element. */
|
||||
|
||||
@@ -255,15 +255,15 @@ var Events = Module("events", {
|
||||
* @returns {boolean}
|
||||
*/
|
||||
feedkeys: function (keys, noremap, quiet, mode) {
|
||||
|
||||
let wasFeeding = this.feedingKeys;
|
||||
this.feedingKeys = true;
|
||||
this.duringFeed = this.duringFeed || [];
|
||||
let wasQuiet = commandline.quiet;
|
||||
if (quiet)
|
||||
commandline.quiet = quiet;
|
||||
|
||||
try {
|
||||
var wasFeeding = this.feedingKeys;
|
||||
this.feedingKeys = true;
|
||||
this.duringFeed = this.duringFeed || [];
|
||||
|
||||
var wasQuiet = commandline.quiet;
|
||||
if (quiet)
|
||||
commandline.quiet = quiet;
|
||||
|
||||
util.threadYield(1, true);
|
||||
|
||||
for (let [, evt_obj] in Iterator(events.fromString(keys))) {
|
||||
|
||||
Reference in New Issue
Block a user