diff --git a/common/content/buffer.js b/common/content/buffer.js index d6f948c6..34e6f832 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -1133,7 +1133,7 @@ var Buffer = Module("buffer", { return ""; let range = selection.getRangeAt(0).cloneRange(); - if (range.collapsed) { + if (range.collapsed && range.startContainer instanceof Text) { let re = options.get("iskeyword").regexp; Editor.extendRange(range, true, re, true); Editor.extendRange(range, false, re, true); diff --git a/common/content/dactyl.js b/common/content/dactyl.js index 9aea3b2e..11e5532d 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -361,7 +361,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), { echoerr: function echoerr(str, flags) { flags |= commandline.APPEND_TO_MESSAGES; - if (isinstance(str, ["Error", "Exception"]) || isinstance(str, ["XPCWrappedNative_NoHelper"]) && /^\[Exception/.test(str)) + if (isinstance(str, ["DOMException", "Error", "Exception"]) || isinstance(str, ["XPCWrappedNative_NoHelper"]) && /^\[Exception/.test(str)) dactyl.reportError(str); if (isObject(str) && "echoerr" in str) str = str.echoerr;