Page MenuHomePhabricator

Close popup when focus is moving on
Closed, ResolvedPublic

Description

Following standard OOUI behaviour popups should close when the keyboard focus is moving to the next element. Currently this is not happening when a revision is selected in revision slider (see screenshot). We will test this with both mouse as well as pure keyboard navigation.

Screenshot from 2023-06-29 14-30-17.png (571×800 px, 74 KB)

Requirements

Findings

The popup is bound to the yellow and blue buttons. Since these have many extra interactions (like dragging and hover), the popup is not a PopupButtonWidget but onyl a PopupWidget. Some of the interactions that are standard in OOUI for the button widget are written / need to be written extra for the buttons here.

Event Timeline

Looks like the OOUI standard actually has the same behaviour as described above. So we would need to change it there, if we dislike it. Lets talk about that. :)

We looked into this again in a group session and found this setting for the PopupWidget:

autoClose: true

Change 951886 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/RevisionSlider@master] Close popup when focus is moving on

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

Change 952118 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/RevisionSlider@master] Replace numeric key codes with OO.ui.Keys conmstants

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

Change 952119 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/RevisionSlider@master] Fix left/right cursor key handler also acting on all other keys

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

Change 952118 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Replace numeric key codes with OO.ui.Keys constants

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

Change 952119 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Fix left/right cursor key handler also acting on all other keys

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

Change 952460 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/RevisionSlider@master] Trigger popup creation on pointer focus

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

Change 952460 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Trigger popup creation on pointer focus

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

Change 952859 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/RevisionSlider@master] Close popup when clicking enter

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

Change 952882 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/RevisionSlider@master] Hide tooltip when the focus moves away

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

Change 951886 abandoned by Svantje Lilienthal:

[mediawiki/extensions/RevisionSlider@master] Close popup when focus is moving on

Reason:

To prevent the focus to be lost after tabbing out we went with a different approach: Ia68fc5ffbb63b4a534c84987879499e06cd60238

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

Change 952882 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Close tooltip when the focus moves away

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

Change 952859 merged by jenkins-bot:

[mediawiki/extensions/RevisionSlider@master] Close popup when clicking enter

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