Skip to content
This repository was archived by the owner on Mar 16, 2018. It is now read-only.

Commit d5336ec

Browse files
committed
Merge branch 'operakeyfix' of git://github.com/miketaylr/jQueryAutocompletePlugin into miketaylr-operakeyfix
Conflicts: jquery.autocomplete.js
2 parents 8229bdb + fa78892 commit d5336ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery.autocomplete.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ $.Autocompleter = function(input, options) {
9595
}
9696
});
9797

98-
// only opera doesn't trigger keydown multiple times while pressed, others don't work with keypress at all
99-
$input.bind(($.browser.opera ? "keypress" : "keydown") + ".autocomplete", function(event) {
98+
// older versions of opera don't trigger keydown multiple times while pressed, others don't work with keypress at all
99+
$input.bind(($.browser.opera && !'KeyboardEvent' in window) ? "keypress" : "keydown") + ".autocomplete", function(event) {
100100
// a keypress means the input has focus
101101
// avoids issue where input had focus before the autocomplete was applied
102102
hasFocus = 1;

0 commit comments

Comments
 (0)