Page MenuHomePhabricator

Property- and item suggesters pop back up after a selection is made
Closed, ResolvedPublic8 Estimated Story Points

Description

Problem:
When a property is selected and we tab between input suggesters. Tabbing further very quickly to add a new property, the input suggester of the previous input box still pops up after a delay. This should not happen, i.e. the previous suggester should not pop up anymore after the user tabbed out of that input field.

Screenshots

image.png (562×793 px, 63 KB)

image.png (228×836 px, 118 KB)

image.png (189×687 px, 58 KB)

Acceptance criteria:

  • When we tab out of an input field after selecting, the suggester should remain closed on the selection made

Original report:
I apologize if I already reported this, it's a long running issue. When the back end is slow (I don't know how else to explain it), this issue appears. When the back end is otherwise fast, it mostly disappears altogether.

Event Timeline

@Manuel @amy_rc: Could you try reproducing this?

I tested the scenario but haven't been able to replicate it yet.

@Moebeus Thank you for pointing this issue. @Lydia_Pintscher This is most noticeable when we use tabs quickly.

I can also replicate this when I am quick: If I move out of input box A to input box B, while a lookup in input box A is still in progress, I might end up with input suggestions for both input boxes (on top of each other).

I wonder if the fix for this belongs in jquery.ui.suggester or jquery.wikibase.entityselector? The suggester is used by three components, as far as I can tell:

  • site selector
  • page suggester
  • entity selector

I assume the site selector and page selector are used when editing sitelinks. Should those be allowed to open the suggester menu even when they don’t have focus?

I think for now I’ll try to put the fix in the generic suggester component, since it already has some logic to close itself when losing focus.

Alright, I have three commits that fix several issues in the suggester. However, I’m worried that they might go “too far”, and show the suggester more often that we want. Can I discuss this with one of you in a call? (I think it will be easier to show it live than trying to describe what I mean here.)

Who do you need to discuss it with? Manuel/Amy/me or Moebeus or one of the other devs?

Change 700234 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[data-values/value-view@master] $.ui.suggester: Don’t open menu if element lost focus

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

Change 700235 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[data-values/value-view@master] $.ui.suggester: Show menu on focus, not click

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

Change 700236 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[data-values/value-view@master] $.ui.suggester: Fix tracking of “is searching” flag

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

Question discussed with Manuel, opened T285102. This is good to review, I think.

Change 700234 merged by jenkins-bot:

[data-values/value-view@master] $.ui.suggester: Don’t open menu if element lost focus

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

Change 700478 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/extensions/Wikibase@master] Bump wikibase-data-values-value-view to HEAD

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

Change 700478 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Bump wikibase-data-values-value-view to HEAD

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

Change 700235 abandoned by Lucas Werkmeister (WMDE):

[data-values/value-view@master] $.ui.suggester: Show menu on focus, not click

Reason:

The attached task was closed, so I can only guess that the discussion in T284219#7161318 ended with a decision not to merge this? (I don’t remember anymore.)

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

Change 700236 abandoned by Lucas Werkmeister (WMDE):

[data-values/value-view@master] $.ui.suggester: Fix tracking of “is searching” flag

Reason:

Per parent change.

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