Page MenuHomePhabricator

Firefox sorts API template (and other?) suggestions in a very poor manner, unlike Chrome/Safari/Opera
Closed, ResolvedPublic1 Story Points

Description

In VE, Insert->Template. Type "cn".

Expected behavior: The "cn" template is sorted at the top of the list.

Actual behavior: The "cn" template is sorted towards the middle of the list, with "cnblue" at the top for no discernable reason.

The behavior when hitting enter is related, and worse: if I type "cn<enter>", and there is an exact match on cn, then I definitely expect to get cn as the output not "cnblue".

Event Timeline

LuisVilla created this task.Sep 5 2015, 9:14 AM
LuisVilla raised the priority of this task from to Needs Triage.
LuisVilla updated the task description. (Show Details)
LuisVilla added a project: VisualEditor.
LuisVilla added a subscriber: LuisVilla.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2015, 9:14 AM

This is the order from the Search system being wonky…

Jdforrester-WMF triaged this task as Normal priority.Sep 8 2015, 7:28 PM
Jdforrester-WMF set Security to None.
Jdforrester-WMF moved this task from To Triage to TR0: Interrupt on the VisualEditor board.

Working just fine for me. Better than fine, in fact; it resolves the redirect and shows me the *actual* template I was trying to get, rather than inserting a transclusion of a redirect.

Deskana closed this task as Invalid.Sep 8 2015, 11:22 PM
Deskana claimed this task.

Resolving as invalid since I'm unable to reproduce. @LuisVilla, if you're still experiencing this issue, please provide more detailed steps to reproduce the issue so I can investigate and reopen if necessary. Thanks!

LuisVilla reopened this task as Open.EditedSep 9 2015, 3:59 AM

Attached is what I see; enwiki, Firefox, Linux. I believe I also see the same on Firefox Mac but don't have that box handy right now. Might be platform/browser specific, but reopening in any case. Dan, agree that the behavior you're seeing is great/desired behavior.

Attached is what I see; enwiki, Firefox, Linux.

Confirmed. I cannot reproduce the problem in Chrome, but I can in Firefox.

Krenair added a subscriber: Krenair.Sep 9 2015, 4:06 AM

The queries that are issued by VisualEditor in both browsers are identical, and in both the CNBLUE result's index is 10, which means it really shouldn't be appearing at the top. This appears to be a bug specific to VisualEditor in Firefox.

Jdforrester-WMF renamed this task from autocomplete of templates selects unexpected template to Firefox sorts API template (and other?) suggestions in a very poor manner, unlike Chrome/Safari/Opera.Sep 9 2015, 9:24 PM
Jdforrester-WMF reassigned this task from Deskana to Krenair.

Change 237410 had a related patch set uploaded (by Alex Monk):
Order template title results by provided index

https://gerrit.wikimedia.org/r/237410

I think we were relying on undefined behaviour to sort those (response.query.pages was showing in different orders depending on which browser you used), instead my code tries to put them all into a list keyed by the given indexes.

Change 237410 merged by jenkins-bot:
Order template title results by provided index

https://gerrit.wikimedia.org/r/237410

Jdforrester-WMF closed this task as Resolved.Sep 10 2015, 10:52 PM
Jdforrester-WMF edited a custom field.