Don't blow up if the user hasn't yet clicked the content when moving around in caret mode.

This commit is contained in:
Kris Maglione committed 2010-09-24 10:35:27 -04:00
1 parent 4b5c0d1f84
commit 296ceee3d2
2 files changed
+5 -2

No files matched your search

+5
View File
@@ -424,6 +424,11 @@ const Editor = Module("editor", {
count = 1;
let controller = buffer.selectionController;
let sel = controller.getSelection(controller.SELECTION_NORMAL);
if (!sel.rangeCount) // Hack.
sel.addRange(RangeFind.endpoint(
RangeFind.nodeRange(tabs.localStore.focusedFrame.document.documentElement),
true));
while (count--)
controller[caretModeMethod](caretModeArg, false);
},