Page MenuHomePhabricator

Entity Suggester shows double information at certain moments
Closed, ResolvedPublic

Description

At certain moments, the information displayed in the entity suggester is doubled:

Screen Shot 2016-08-23 at 10.58.33.png (457×1 px, 101 KB)

https://www.wikidata.org/wiki/Q2537692

Event Timeline

hoo added a project: Patch-For-Review.
hoo subscribed.

Patch: https://github.com/Wikidata-lib/PropertySuggester/pull/175

The cause here is that we do the search for suggestions whenever the property input field is empty and gets focused. As it gets focused twice whenever a new statement is added, we load the suggestions twice and (due to a race condition) even sometimes display them twice. The fix for this is simple: Only load the suggestions one the very first focus, the base suggester will then do the right things for us, when the field's value changes.

thiemowmde moved this task from Proposed to Review on the Wikidata-Sprint-2016-08-16 board.
thiemowmde moved this task from incoming to in progress on the Wikidata board.
thiemowmde added subscribers: thiemowmde, Jonas.
thiemowmde moved this task from Review to Done on the Wikidata-Sprint-2016-08-30 board.