Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Page MenuHomePhabricator

Wikidata Kartographer bug when clicking on zoom actions (+/-): the picker is closed
Closed, ResolvedPublic3 Estimated Story PointsBUG REPORT

Description

List of steps to reproduce

  • go to a random already-existing Wikidata item with a coordinate location (e.g. https://www.wikidata.org/wiki/Q111103620 this cute palace in Trento, Italy )
  • goto "coordinate location"
  • click Edit
  • keep calm, don't do anything else, don't move the map, just do this:
  • click on Zoom in (+), or Zoom out (-)

Proof of concept

What happens?:

The zoom button closes the Kartographer picker.

What should have happened instead?:

The zoom button should just zoom.

The zoom button should not close the Kartographer picker.

Reproduced in:

  • Reproduced on Wikidata using Firefox 97 and Chromium 99 on Xubuntu 20.04 focal fossa (tested both as logged-in and logged-out) from @valerio.bozzolan
  • Reproduced on Wikidata using Firefox 97.0.2, Chrome 98.0.4758.102, Edge 99.0.1150.30 from Microsoft Windows 64bit (tested both as logged-in and logged-out) from @lucamauri
  • Reproduced on Wikidata using Firefox on macOS from a logged-in user
  • ...

Corner cases

  • Cannot reproduced if the user moves the map before clicking a zoom button (reported by the kind @Melderick)
  • ...

Hypothesis

Probably the problem is somewhere here:

https://github.com/wikimedia/mediawiki-extensions-Kartographer/blob/master/modules/dialog/dialog.js

  • Verify that the hash does not change when the edit key is pressed in MapDialog.prototype.updateHash
  • ...

Event Timeline

Related, when I go to full screen with the square bracketed button in the top-right corner of the map, and then close the full screen view, the map totally disappears.

valerio.bozzolan added a subscriber: Melderick.

Related, when I go to full screen with the square bracketed button in the top-right corner of the map, and then close the full screen view, the map totally disappears.

Uhm. So when opening full-screen mode, there is not the possibility to exit full-screen mode, since there is just the possibility to close the picker.

Hi @thiemowmde! Thank you for your work!

Can I ask you if you can reproduce? :)

Change 841526 had a related patch set uploaded (by Hoo man; author: Hoo man):

[data-values/value-view@master] jquery.ui.inputextender: Don't close when focus moves inside

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

Change 841526 merged by jenkins-bot:

[data-values/value-view@master] jquery.ui.inputextender: Don't close when focus moves inside

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

Change 841535 had a related patch set uploaded (by Hoo man; author: Hoo man):

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

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

Change 841535 merged by jenkins-bot:

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

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

OK so if I understand the original design, the goal was to auto-close the widget when focus is lost. So, there is a blur event that, when triggered, tries to close the widget running an animationTimeout. The problem was that doing a zoom was firing this blur event, and there was nothing saying that the user had the focus again on the widget, and nothing stopping the closing attempt. The fix was to stop animationTimeout and the related flag also from the related focusin.XX event.

Thank you so much @hoo for your time

@valerio.bozzolan Exactly: When focus is lost from the input but the preview got clicked on (mousedown), we left it open. But as the map zoom links prevented the mousedown events from bubbling up through the DOM, we couldn't catch clicks on them that way.

karapayneWMDE set the point value for this task to 3.Oct 18 2022, 8:47 AM