Page MenuHomePhabricator

In category input field, typing invalid category name doesn't clear suggestions
Closed, ResolvedPublic

Description

In category input field, typing invalid category name doesn't clear suggestions.

To reproduce:

  1. Open page options dialog, "Categories" tab.
  2. Type a potentially valid category name, such as "A". Wait for suggestions to appear.
  3. Type in something invalid, such as "<", afterwards.
    • From this point on, as long as the category name stays invalid, the suggestions will not be updated, even if the original "A" is deleted and replaced with, say, "Z".
    • De-focusing the field and re-focusing it will clear suggestions.
    • Deleting invalid characters will display correct suggestions again.

Event Timeline

matmarex raised the priority of this task from to Needs Triage.
matmarex updated the task description. (Show Details)
matmarex added a project: VisualEditor.
matmarex changed Security from none to None.
matmarex subscribed.
Jdforrester-WMF moved this task from To Triage to Freezer on the VisualEditor board.

Looks like it got fixed.But, now when invalid characters are entered in the input field , JS error-

s1.PNG (565×1 px, 70 KB)
"Uncaught TypeError: Cannot read property 'replace' of null" appears.See screenshot.

Change 177871 had a related patch set uploaded (by Bartosz Dziewoński):
MWCategoryInputWidget: Don't explode on invalid titles

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

Patch-For-Review

Change 177871 merged by jenkins-bot:
MWCategoryInputWidget: Don't explode on invalid titles

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

Verified the fix in Betalabs and test2