You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
We'be been using activeadmin with turbolinks quite successfully for some time. While migrating to Turbolinks 5, I encountered an issue on batch actions : seems like both ready and turbolinks:load are trigger, which causes click handler to be attached twice.
I've recreated a simple project from scratch to check if that wasn't coming from our side and I do reproduce it. Basically just a brand new default rails app with activeadmin. Source code and live demo are available. Just go to admin/items directly, select items then Batch Actions > Delete Selected Items. The modal is then opened twice as you can see in this screenshot :
Looks like every version between 1.0.0 and 1.3.1 are affected (master might be as well). A possible solution would be to detach previously attached click handler here like this :
$('.batch_actions_selector li a').off('click').on'click', (e)->
I'd be happy to do a PR if that solution seems acceptable. I'm open to other solutions/workarounds/.. as well.
Best!
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hi,
We'be been using activeadmin with turbolinks quite successfully for some time. While migrating to Turbolinks 5, I encountered an issue on batch actions : seems like both
ready
andturbolinks:load
are trigger, which causes click handler to be attached twice.I've recreated a simple project from scratch to check if that wasn't coming from our side and I do reproduce it. Basically just a brand new default rails app with activeadmin. Source code and live demo are available. Just go to

admin/items
directly, select items thenBatch Actions
>Delete Selected Items
. The modal is then opened twice as you can see in this screenshot :Looks like every version between 1.0.0 and 1.3.1 are affected (master might be as well). A possible solution would be to detach previously attached click handler here like this :
I'd be happy to do a PR if that solution seems acceptable. I'm open to other solutions/workarounds/.. as well.
Best!
The text was updated successfully, but these errors were encountered: