Permalink
Browse files

Change the TAB pressing priority to make the TAB press consistent wit…

…h what we see.

Next job is to make a popup telling user that he can tab complete, even when its a provider hes typing
  • Loading branch information...
1 parent dfeede7 commit 012ca978ada64c8c40c36f297626a6fd5e5cc906 @grssam grssam committed Jun 12, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 awesomeBarHD/bootstrap.js
@@ -1080,14 +1080,21 @@ function addAwesomeBarHD(window) {
// Allow moving backwards through categories
let {complete, next, prev} = categoryBox;
+ let {HDlastValue, selectionEnd, selectionStart, value} = origInput;
if (event.shiftKey && canSwitch()) {
usage.tabPrev++;
categoryBox.activate(prev);
}
// Allow tab completion of a category
else if (complete != null) {
usage.tabComplete++;
- categoryBox.activate(complete);
+ categoryBox.activate(complete);
+ }
+ //If there is no category to complete and we can't switch,
+ //Copy over the new value and selection if it changed when not searching
+ else if(HDlastValue != value && categoryBox.active == goCategory && !canSwitch()) {
+ origInput.HDlastValue = hdInput.value = value;
+ hdInput.setSelectionRange(selectionStart, selectionEnd);
}
// Allow moving forwards through categories
else if (canSwitch()) {

0 comments on commit 012ca97

Please sign in to comment.