Page MenuHomePhabricator

Wire Close Popper Action to 'cross' and blur action
Closed, ResolvedPublic

Description

Note: consider if the cross should be handled by an EventEmittingButton (from termbox) like thing.

Event Timeline

Change 549085 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] TR: Close popper when x is clicked

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

I have a patch that wires up the "x" to close the popper, I didn't yet look into closing it if the user clicks onto something else.

Change 549085 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] TR: Close popper when x is clicked

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

So apparently OOUI sets tabindex="0" on the constraints icon, with that we can actually focus (and thus also handle blur). I'll do the same for us in order to re-implement the behavior as closely as possible.

@hoo cool. That sounds great and I remember us having to do the same thing with the modal type objects we built for termbox.

Change 549675 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] TR: Close popper on TaintedIcon blur

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

I just implemented it like this, but I'm not sure that's going to suffice… if the user clicks on the popper, this will probably also trigger the blur and thus close the popper. Maybe if the popper is a direct child of the TaintedIcon <a> this will work, but I'm not sure.

Change 551541 had a related patch set uploaded (by Hoo man; owner: Hoo man):
[mediawiki/extensions/Wikibase@master] TR: Close the popper on focusout

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

Change 549675 abandoned by Hoo man:
TR: Close popper on TaintedIcon blur

Reason:
Replaced by I5dad7680a7e0a48be1e518d73c28812b7b819fb4.

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

Change 551541 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] TR: Close the popper on focusout

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