(bug 27944) Search placeholder was inserted even when the search box was already...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 9 Mar 2011 13:54:02 +0000 (13:54 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 9 Mar 2011 13:54:02 +0000 (13:54 +0000)
commit324b9997f34962a2f43b6bbbffe5024fcca1ae0c
treee93b8750694521a3122b049e5f2d763ca36bb9d9
parent47e771d5729b06c7a70e0c18c60b6066cf2ed657
(bug 27944) Search placeholder was inserted even when the search box was already focused, leading to the placeholder being added to the search string. This revision doesn't fix the initial insertion of the placeholder if the search box is focused but empty, but it does remove it upon keydown (and paste), which fixes the search string munging.

(bug 26135) Support drag and drop in the search box in Firefox. Done by adding 'drop' to the list of events to update search suggestions for and to remove the placeholder for. Removing the placeholder is trickier in this case because 'drop' fires after the text has already been inserted, and because it could have been inserted at any offset in the placeholder string. Used dataTransfer magic to obtain the text being dropped and just overwrote the search box text with that.
resources/jquery/jquery.placeholder.js