1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-24 03:02:27 +01:00

Focus the command-line with its value changes as well as when it's un-collapsed.

This commit is contained in:
Kris Maglione
2010-09-27 15:06:31 -04:00
parent 89a904f1a2
commit 7645fca3fe

View File

@@ -40,6 +40,8 @@ const CommandWidgets = Class("CommandWidgets", {
onChange: function (elem) {
elem.selectionStart = elem.value.length;
elem.selectionEnd = elem.value.length;
if (!elem.collapsed)
elem.focus();
},
onVisibility: function (elem, visible) visible && elem.focus()
});