Page MenuHomePhabricator

Not possible to change tabs in code popup on Safari
Closed, ResolvedPublic

Description

I'm not able to navigate to the other tabs of the recently added code popup on Safari. The JavaScript console doesn't give an error.

Using Safari 11 on macOS High Sierra.

Event Timeline

Hm, AFAICT we’re just using Bootstrap components for this… do the tabs on this page work in Safari?

Hm, AFAICT we’re just using Bootstrap components for this… do the tabs on this page work in Safari?

These (of course) work. Clicking the tab on WDQS does reselect the text area (the cursor flickers), but the content doesn't change.

If there are no errors in the console, I’m not sure how to debug this… as a random guess – does $('[href="#HTML"]').tab('show') work to show the HTML tab?

Ah, it seems I can also reproduce this in GNOME’s “Web” browser (aka “Epiphany”). That should help, at least :)

It looks like you can actually select any tab with $('[href="#HTML"]').tab('show') (substituting the right name in place of HTML), but clicking any tab always gets you back to the URL tab.

Furthermore, when I spam-click a tab very quickly, occasionally the right tab flashes up quickly. So I suspect that the tab switching works, and then something, for some reason, switches you back to the URL tab.

Hah, we were actually rebuilding the whole dialog with each click, but the browser is fast enough that it mostly looked like nothing was happening :D fix coming up.

Change 388524 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[wikidata/query/gui@master] Only initialize code example dialog once

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

Change 388524 merged by jenkins-bot:
[wikidata/query/gui@master] Only initialize code example dialog when shown

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

Lucas_Werkmeister_WMDE moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.

Should be fixed (as soon as the fix is deployed).