Last modified: 2014-06-17 17:02:36 UTC
Created attachment 10070 [details] Broken search box with additional search rendered underneath main search box Tested on MediaWiki.org: When typing in the search box, sometimes a second search box is rendered underneath or next to the primary search box. Both search boxes are active and respond to events, although the second search box exhibits legacy behavior (no bold highlight of letters typed, no "contains" search option). Tested in Chrome 17 on Ubuntu 11.04. Steps to reproduce: Repeatedly load any page on MediaWiki.org with a clear cache. Type in the search box. In a minority of cases, the broken behavior is present.
Created attachment 10071 [details] Correct search behavior
Created attachment 10072 [details] When the screen is resized, the whole secondary search box becomes visible.
(Note that while the screenshots indicate that I'm logged in with gadgets active, I've been able to reproduce this issue logged out.)
I think we've seen this before when both Vector's SimpleSearch and the other search option were enabled at once.... thought we resolved it in configuration though.
Looks like live configuration has them both on, so either they need to be fixed to disable the one when the other's active or we should disable $wgEnableMWSuggest. (But does the vector extension's simplesearch only work on Vector skin?)
Vector's SimpleSearch attempts to disable MWSuggest (the built-in thingy)... I suspect that sometimes they get loaded in the wrong order; if simpleSearch's ready function executes before mwsuggest.js gets run then it won't call the function to disable it.
r112153 should fix this -- adds mediawiki.legacy.mwsuggest to ext.vector.simpleSearch's dependencies so we guarantee the load order between them. Confirmed it fixes it on my local server, where it's very consistently loading wrong before the fix.