mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-17 03:56:07 +00:00
Remove deprecated jQuery API .browser in suggest.js. No need for a replacement since it works without too. see #22975.
git-svn-id: http://core.svn.wordpress.org/trunk@24371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e1617a41e8
commit
df73ce7957
21
wp-includes/js/jquery/suggest.js
vendored
21
wp-includes/js/jquery/suggest.js
vendored
@ -18,7 +18,7 @@
|
||||
var $input, $results, timeout, prevLength, cache, cacheSize;
|
||||
|
||||
$input = $(input).attr("autocomplete", "off");
|
||||
$results = $(document.createElement("ul"));
|
||||
$results = $("<ul/>");
|
||||
|
||||
timeout = false; // hold timeout ID for suggestion results to appear
|
||||
prevLength = 0; // last recorded length of $input.val()
|
||||
@ -37,22 +37,7 @@
|
||||
setTimeout(function() { $results.hide() }, 200);
|
||||
});
|
||||
|
||||
|
||||
// help IE users if possible
|
||||
if ( $.browser.msie ) {
|
||||
try {
|
||||
$results.bgiframe();
|
||||
} catch(e) { }
|
||||
}
|
||||
|
||||
// I really hate browser detection, but I don't see any other way
|
||||
if ($.browser.mozilla)
|
||||
$input.keypress(processKey); // onkeypress repeats arrow keys in Mozilla/Opera
|
||||
else
|
||||
$input.keydown(processKey); // onkeydown repeats arrow keys in IE/Safari
|
||||
|
||||
|
||||
|
||||
$input.keydown(processKey);
|
||||
|
||||
function resetPosition() {
|
||||
// requires jquery.dimension plugin
|
||||
@ -327,4 +312,4 @@
|
||||
|
||||
};
|
||||
|
||||
})(jQuery);
|
||||
})(jQuery);
|
||||
|
Loading…
x
Reference in New Issue
Block a user