Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stopping event propagation #504

Open
ghost opened this issue Sep 7, 2015 · 2 comments
Open

Stopping event propagation #504

ghost opened this issue Sep 7, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 7, 2015

Hey,

Thanks for this awesome lib.

Is there a reason though why 'switchChange.bootstrapSwitch' is firing after the switch has already happened?

I would like to make a call to the server first, then give the green light for switching if everything went fine.

So: If the server call errored I'd like to stopPropagation for the event.

Maybe one could introduce a new callback before the switch happens. The other option would be just calling the existing callback before the actual switch.

Any thoughts on this?

If this is a generally liked idea I'm 100% committed to implementing this as well, just want to check before.

@kruggs
Copy link

kruggs commented Sep 17, 2015

Hi, exact, could be nice to be able to do that.
Also :

  • if you click on ON, the switch change to OFF and trigger the event
  • if you click on right part (white), the switch change to OFF and trigger the event
  • once you switch to OFF, if you click on ON, it will switch back to ON and trigger the event
  • BUT if you click on left part (white), nothing trigger, no event, no switch to ON

Something doesn't work well on the part, no or it's me ?

edit : i forget to say i'm using : https://cdnjs.cloudflare.com/ajax/libs/bootstrap-switch/3.3.2/ this version

@crowbarsolutions
Copy link

Duplicate of #268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants