Page MenuHomePhabricator

ItemSelector widget on Special:NewLexeme must handle "manual" entering of the item ID
Closed, DuplicatePublic

Description

Currently the item selector widget used on Special:NewLexeme works the following way: I enter a label of the relevant item, or a part of it, and select a relevant item from the suggested list. Once this happens, the item ID is put in the hidden field which is then send to the backend.

But: When I enter the item ID not its label in the "text field", i.e. I enter "Q42" instead of typing "Douglas Adams", the hidden field is not updated, and the empty value is send to the backend instead of "Q42".

This should be changed so that if the user enters the value to the text field instead of picking an item from the "suggested" list, it is also handled as expected.

AC:

  • on blur, if no value is already selected (e.g. through click on a suggested item), the current "search value" is used as value for the hidden field

Info

  • this is a "good enough" solution until T200767 hopefully tackles this globally

Event Timeline

WMDE-leszek created this task.
Lydia_Pintscher lowered the priority of this task from Medium to Low.Jun 29 2018, 12:14 PM

Tested it. Can reproduce.

@Lydia_Pintscher Is this specifically about manually entering Q-ids or do we also want to change the behavior so that it selects the option that is currently selected when tabbing out of the input field?

We want the same behaviour as the "real" item selector. There when tabbing out the item that is selected is chosen. So let's do this here too.