Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Removing stopPropagation #611

Closed
Closed
@andreeib

Description

@andreeib

Hello, I'm using the slider inside a sweetalert2 modal and have a problem with users trying to slide to the min or max value and accidentally closing the modal.

Clicking and sliding to min/max value with the mouse going outside the modal then releasing the click will close the modal because of click event on background overlay.

Removing stopPropagation fixes the issue because sweetalert2/boostrap knows if the background overlay click was intended or not based on mousedown/mouseup.

Made some tests with stopPropagation removed and seems to work correctly. Will a pull request with this change be merged?

https://css-tricks.com/dangers-stopping-event-propagation/

Expected behaviour

The mousedown events should propagate upwards.

Actual behaviour

The mousedown events don't propagate because stopPropagation is called.

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