1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-21 14:37:58 +01:00

Completion of certain chrome:, resource:, and about: URLs.

This commit is contained in:
Kris Maglione
2010-12-14 23:05:41 -05:00
parent 50e47b9b2f
commit 0dcf1d8ffd
9 changed files with 118 additions and 41 deletions

View File

@@ -23,10 +23,8 @@ const Modes = Module("modes", {
this._modeStack = update([], {
pop: function pop() {
if (this.length <= 1) {
util.dumpStack("Trying to pop last element in mode stack");
if (this.length <= 1)
throw Error("Trying to pop last element in mode stack");
}
return pop.superapply(this, arguments);
}
});
@@ -47,7 +45,7 @@ const Modes = Module("modes", {
if (selection && !selection.isCollapsed)
selection.collapseToStart();
}
else
else if (stack.pop)
editor.unselectText();
}
});
@@ -96,10 +94,12 @@ const Modes = Module("modes", {
dactyl.focusContent(true);
if (prev.main == modes.NORMAL) {
dactyl.focusContent(true);
// clear any selection made
let selection = window.content.getSelection();
if (selection && !selection.isCollapsed)
selection.collapseToStart();
for (let frame in values(buffer.allFrames())) {
// clear any selection made
let selection = frame.getSelection();
if (selection && !selection.isCollapsed)
selection.collapseToStart();
}
}
}