From 40088580fd093af8293b95cb34c4644fb09ffe91 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Thu, 14 Jul 2011 01:24:10 -0400 Subject: [PATCH] Closes issue #596. --- common/content/buffer.js | 2 +- common/content/dactyl.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;