Closed dereklucas closed 8 years ago
Hi!
We'll try to reproduce this issue and we'll also investigate how much this project and @jschr's bootstrap-modal overlap - it may be a good idea to merge the two!
Thanks for reporting this to us :smile:,
~ vjt@openssl.it ~ http://sindro.me/
On 08 Apr 2014, at 20:50, Derek Lucas notifications@github.com wrote:
I have a subscribe/unsubscribe link that looks a little like this:
<%= link_to 'Subscribe', subscribe_deck_path(@deck), class: "subscribe_action subscribe #{@deck.subscribed? ? '' : 'active'}", remote: true %> <%= link_to 'Unsubscribe', unsubscribe_deck_path(@deck), method: :delete, data: { confirm: "Are you sure?" }, class: "subscribe_action unsubscribe #{@deck.subscribed? ? 'active' : ''}", remote: true %> Switching the display state of the links based on subscription status. If I Unsubscribe once, I get the correct modal. If I then subscribe and unsubscribe again without refreshing the page, I get the browser dialog. It's as if the event is being attached with jQuery's one() function.. I'm also using https://github.com/jschr/bootstrap-modal if that's a conflict.
— Reply to this email directly or view it on GitHub.
Works beautifully! Thank you
I've been able to reproduce this in a rails app that doesn't use bootstrap modal. On confirm, it doesn't continue to the link provided in the href as well.
<a class="btn btn-default " data-confirm="Are you sure you want to make this Poll visible? Doing so will wipe all answers." href="http://bedev.local:3000/workrooms/1/surveys/9/visible">
<span class="icon icon_mbm-visible-on visible active-on"></span>
<span class="icon icon_mbm-visible visible active-off"></span>
<span>Visible to Workgroup</span>
</a>
any update?
Hi @kntmrkm, thanks for the heads up. I will try to give this a spin in the coming days.
Thanks everyone involved in tracking this down. Please try the latest v1.2.0 and let me know if it works for you :-)
Moreover, please see http://jsfiddle.net/zpu4u6mh/ for an example using Rails remote links. Please let me know if there are still scenarios breaking the code expectations.
I have a subscribe/unsubscribe link that looks a little like this:
Switching the display state of the links based on subscription status. If I Unsubscribe once, I get the correct modal. If I then subscribe and unsubscribe again without refreshing the page, I get the browser dialog. It's as if the event is being attached with jQuery's one() function..
I'm also using https://github.com/jschr/bootstrap-modal if that's a conflict.