Page MenuHomePhabricator

Do not use native datalist support in mediawiki.legacy.mwsuggest
Closed, ResolvedPublic

Description

Since 1.18 mediawiki.legacy.mwsuggest uses the HTML5 datalists for search suggestions in Monobook skin in all browsers that implemented this feature except Opera, which is blacklisted because of some bug.
Please blacklist Firefox as well, the width of the box with the suggestions isn't increased, so the entries are truncated. See screenshot on de.wikipedia: http://de.wikipedia.org/wiki/Datei:Minisuchfeld_bei_MW118.jpg The screenshot is taken with Firefox 8, I could confirm this issue with Firefox 5, too.


Version: 1.18.x
Severity: normal

Details

Reference
bz31602

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:51 PM
bzimport set Reference to bz31602.
bzimport added a subscriber: Unknown Object (MLST).

Is this also the cause for having double dropdowns in Chrome?

Datalists seem to have problems in all browsers:

  • Opera already is blacklisted
  • Firefox doesn't increase the width, search doesn't start after user selects a suggestion (bug 31654)
  • Safari 5 doesn't show the suggestions at all (bug 31768)

Having two different implementations (native datalists vs. self-made list) is confusing when you try to help others figuring out where the problem is, and after the above list of browser bugs I can't believe that any other browser has an implementation that is usable in every situation so I suggest to set
window.os_use_datalist = false
again, i. e. revert revision 79363.

Created attachment 9261
Proposed patch

While I tested the patch I found another problem with HTML5 datalists (tested in Firefox 4, but probably a problem in every implementation):
My testwiki uses German localization, so user pages begin with "Benutzer:" or "Benutzerin:" for females. When datalists are used only those pages were shown, which start with the exact namespace, i. e., typing "User:" didn't show any page, "Benutzer:" showed only pages of male or neutral users, "Benutzerin:" only pages of females. After I disabled datalists all three could be used to show any userpage as it should be.

Attached:

Oh really? We have specific bug about that: bug 31697.