Ticket #22975: 22975.suggest.patch
File 22975.suggest.patch, 1.2 KB (added by , 10 years ago) |
---|
-
wp-includes/js/jquery/suggest.js
18 18 var $input, $results, timeout, prevLength, cache, cacheSize; 19 19 20 20 $input = $(input).attr("autocomplete", "off"); 21 $results = $( document.createElement("ul"));21 $results = $("<ul/>"); 22 22 23 23 timeout = false; // hold timeout ID for suggestion results to appear 24 24 prevLength = 0; // last recorded length of $input.val() … … 37 37 setTimeout(function() { $results.hide() }, 200); 38 38 }); 39 39 40 $input.keydown(processKey); 40 41 41 // help IE users if possible42 if ( $.browser.msie ) {43 try {44 $results.bgiframe();45 } catch(e) { }46 }47 48 // I really hate browser detection, but I don't see any other way49 if ($.browser.mozilla)50 $input.keypress(processKey); // onkeypress repeats arrow keys in Mozilla/Opera51 else52 $input.keydown(processKey); // onkeydown repeats arrow keys in IE/Safari53 54 55 56 57 42 function resetPosition() { 58 43 // requires jquery.dimension plugin 59 44 var offset = $input.offset(); … … 327 312 328 313 }; 329 314 330 })(jQuery); 331 No newline at end of file 315 })(jQuery);