aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/autocomplete.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/autocomplete.js b/ui/autocomplete.js
index 10de5dc19..d53a1d5e3 100644
--- a/ui/autocomplete.js
+++ b/ui/autocomplete.js
@@ -394,8 +394,13 @@ $.widget( "ui.autocomplete", {
_searchTimeout: function( event ) {
clearTimeout( this.searching );
this.searching = this._delay(function() {
- // only search if the value has changed
- if ( this.term !== this._value() ) {
+
+ // Search if the value has changed, or if the user retypes the same value (see #7434)
+ var equalValues = this.term === this._value(),
+ menuVisible = this.menu.element.is( ":visible" ),
+ modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
+
+ if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
this.selectedItem = null;
this.search( null, event );
}