Skip to content

Modals should handle clicks on them, even if menus are open #4907

@benjiwheeler

Description

@benjiwheeler

A follow-up to #4700 and #4809

Expected Behavior

If a menu is open and a modal is open too, and you click on the modal, the click should be handled by the modal, without causing the menu to close.

Actual Behavior

The mouseup causes the menu to close before the modal handles the mouseup.

This can pose a problem if the modal has been presented by the menu. We ran into a situation with sb-file-uploader where clicking on its modal caused the menu to close -- which caused sb-file-uploader to unmount.

Can't reproduce

You can't run into this using current code, just with code we've tried to introduce that hasn't worked because of this problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions