brutaldesign/swipebox

Can not close Swipebox

Closed this issue · 1 comments

The closeSlide action does not have preventDefault() andstopPropagation(), so clicking the Close button may trigger Swipebox to open again if a binded Swipebox element is below the Close button.

You can see this happening in the Swipebox Project Page it here:

http://youtu.be/dJWy5xoQO5I?hd=1

My suggested solution is to change this line :
$( '#swipebox-close' ).bind( action, function() {

for this:
$( '#swipebox-close' ).bind( action, function( event ) {
event.preventDefault();
event.stopPropagation();

Thanks

I've just seen this is a duplicate of: #324 from 2017!!
How can this not be merged yet?