When using a MenuTagMultiselectWidget with an overlay, the menu does not close when clicking outside of the widget but inside of the overlay.
The menu also does not disappear if something causes the widget to be hidden or removed.
When using a MenuTagMultiselectWidget with an overlay, the menu does not close when clicking outside of the widget but inside of the overlay.
The menu also does not disappear if something causes the widget to be hidden or removed.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
MenuTagMultiselectWidget: Don't use overlay for $autoCloseIgnore | oojs/ui | master | +1 -1 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T119044 TagMultiselectWidget (earlier CapsuleMultiselectWidget): UX and functionality improvements | |||
Open | None | T158400 Streamline & improve tag component TagMultiselectWidget (former CapsuleMultiselectWidget) | |||
Resolved | None | T183299 Replace and deprecate CapsuleMultiselectWidget | |||
Resolved | Mooeypoo | T183377 MenuTagMultiselectWidget menu doesn't close properly when used with an overlay |
Hmm, I'll need to see the code for this, but my initial suspicion is that this has to do with $autoCloseIgnore and its definition.
Do you have anything on gerrit or on the codebase for me to refer to? Or even a quick sample that I can test?
Ha, I tried to post an example but I put it on the wrong bug.
These can be observed using ApiSandbox with https://gerrit.wikimedia.org/r/399427
Clicking within the overlay does not make it disappear
Hiding or removing the widget by interacting with other widgets does not make it disappear
Hiding or removing the widget due to external actions does not make it disappear
OK, as I suspected, this was $autoCloseIgnore. The widget adds the $overlay to the autoCloseIgnore, which is wrong -- it means that the menu won't close when you click the overlay, that's basically everywhere.
I submitted a fix to OOUI. Thanks for catching this.
Change 399882 had a related patch set uploaded (by Catrope; owner: Mooeypoo):
[oojs/ui@master] MenuTagMultiselectWidget: Don't use overlay for $autoCloseIgnore
Change 399882 merged by jenkins-bot:
[oojs/ui@master] MenuTagMultiselectWidget: Don't use overlay for $autoCloseIgnore