Page MenuHomePhabricator

[Bug] Commons Structured Data clicks through to Wikidata in Dropdown
Closed, ResolvedPublic

Description

Steps to reproduce:

  • open chrome on an android device
  • go to https://commons.m.wikimedia.org/wiki/File:GOR_Ranggajati_Sumber.jpg
  • click on the structured data tab
  • start typing in the text box under 'Items portrayed in this file'
  • select one of the suggestions
  • your suggestion should be added as a value, but instead you go to wikidata (works fine on desktop)

This has ripple effects for using tools like AC/DC on mobile or a tablet: https://commons.wikimedia.org/wiki/Help_talk:Gadget-ACDC#Bug_on_Android_tablet_and_mobile

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Astinson Hello. Just to clarify: this is an issue when attempting to select an entity listed in the autosuggest text box when you start typing?

yeah, so I start typing, and try to select one of the options: but it opens a new tab. I am on Android devices, editing in Chrome, asking for the desktop version of the site so that I can edit the Structured Data -- in particular I would like to be able to do AC/DC while watching tv, while using a tablet :P

Ramsey-WMF added a subscriber: egardner.

Okay. So what I'm guessing is that the functionality implemented for T224604 isn't compatible with Chrome on at least some Android devices (seems to work fine on iOS.). Gonna throw this over to @egardner for further insight.

I faced the same issue and I tested it in different situations. This bug appears only on Android devices, but not on Apple devices. On Android devices (I tested it on several devices) it appears in all browsers (tested Opera, Chrome and built-in browser) in both desktop and mobile versions. So this must be an Android related problem.

Change 554901 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Explicitly prevent default link behavior for entity lookup options

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

Change 554901 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Explicitly prevent default link behavior for entity lookup options

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

@Astinson this fix should be live on Commons now. Want to give a try?

@Astinson this fix should be live on Commons now. Want to give a try?

The bug still occurs.

Cparle updated the task description. (Show Details)
Cparle updated the task description. (Show Details)

@Ramsey-WMF this isn't an Android team issue, it's a mobile web issue. @Niedzielski @Jdlrobson any ideas? We thought this might fix it but it didn't

I can repro the issue in the Chromium device emulator on Vector per the description:

  1. Enable device emulation.
  2. Visit https://commons.m.wikimedia.org/wiki/File:GOR_Ranggajati_Sumber.jpg?debug=true&useskin=vector.
  3. View the structured data tab.
  4. Type "a" in the depicts field.
  5. Tap the first entry.

However, I don't actually see the EntityLookupElement class referenced in the linked patch loaded so either I've got something entirely wrong on my end or that's why the change had no effect.

Hey @Niedzielski, that component was refactored into EntityAutocompleteInputWidget in a later patch, see here.

@AnneT, eek, I'm not seeing that load either! I do see MenuOptionWidget.

Oops, the patch I referred to isn't on production yet. EntityLookupElement was refactored to EntityInputWidget, which is live on prod at the moment with the failing onMousedown method.

Stephen suggested this might be an issue related to the way events are connected and fired in OOUI, which I'll start digging into but may need help from the OOUI gods at some point...

Change 576374 had a related patch set uploaded (by Anne Tomasevich; owner: Anne Tomasevich):
[mediawiki/extensions/WikibaseMediaInfo@master] Handle middle clicks on autocomplete suggestions differently

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

Change 576374 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Handle middle clicks on autocomplete suggestions differently

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

@Etonkovidova would you happen to have an Android device you can test this with?

Ramsey-WMF added a subscriber: AnneT.

Elena said she'll "borrow" an Android device to test this with 😄

Checked in Chrome on Android device (commons wmf.23) - both mobile and desktop mode - the issue's been fixed.