1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 15:27:58 +01:00

Don't collapse command-line selection on mode change.

This commit is contained in:
Kris Maglione
2010-10-23 18:12:39 -04:00
parent 6649a81f7d
commit 6f95b33694
4 changed files with 16 additions and 32 deletions

View File

@@ -42,12 +42,13 @@ const CommandWidgets = Class("CommandWidgets", {
getElement: CommandWidgets.getEditor,
getGroup: function (value) this.activeGroup.commandline,
onChange: function (elem) {
elem.selectionStart = elem.value.length;
elem.selectionEnd = elem.value.length;
if (!elem.collapsed)
if (!elem.collapsed && elem.inputField != dactyl.focus) {
elem.selectionStart = elem.value.length;
elem.selectionEnd = elem.value.length;
elem.focus();
}
},
onVisibility: function (elem, visible) visible && elem.focus()
onVisibility: function (elem, visible) visible && elem.inputField != dactyl.focus && elem.focus()
});
this.addElem({
name: "prompt",