Skip to content

Commit

Permalink
MDL-51919 forms lib: Autocomplete doesn't hide prematurely.
Browse files Browse the repository at this point in the history
Quickly navigating via the keyboard to an autocomplete
element and hitting down would result in the selections
being displayed and then quickly removed. This has now
been fixed.
  • Loading branch information
abgreeve committed Oct 28, 2015
1 parent e360ff5 commit 527bde6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/amd/build/form-autocomplete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions lib/amd/src/form-autocomplete.js
Expand Up @@ -585,10 +585,12 @@ define(['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification']
window.clearTimeout(closeSuggestionsTimer);
}
closeSuggestionsTimer = window.setTimeout(function() {
if ((e.type == 'blur') && tags) {
createItem(inputId, suggestionsId, selectionId, multiple, originalSelect);
if (e.type == 'blur') {
if (tags) {
createItem(inputId, suggestionsId, selectionId, multiple, originalSelect);
}
closeSuggestions(inputId, suggestionsId, selectionId);
}
closeSuggestions(inputId, suggestionsId, selectionId);
}, 500);
});
var arrowElement = $(document.getElementById(downArrowId));
Expand Down

0 comments on commit 527bde6

Please sign in to comment.