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

rails_ujs not trigger events when we replace dom. #30692

madmax opened this Issue Sep 24, 2017 · 2 comments


None yet
2 participants
Copy link

madmax commented Sep 24, 2017

When we send remote form and render js.erb that will replace current form with new one (for example validation errors) we are not longer able to observer ajax:complete event because original form is removed from dom end event triggered by rails wont work.

Before removing jquery there was possibility to observer ajaxStop event now this is not longer working.

Maybe there should be also global event for ajax:complete?

System configuration

Rails. 5.1.4

@rails-bot rails-bot bot added the stale label Dec 23, 2017


This comment has been minimized.

Copy link

rails-bot bot commented Dec 23, 2017

This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 5-1-stable branch or on master, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@rails-bot rails-bot bot closed this Dec 31, 2017


This comment has been minimized.

Copy link

pabse commented Mar 1, 2018

Anyone still working on this?

In my case I want to use remote pagination. But when I replace the paginator elements in my .js.erb file, ajax:complete does not get triggered.

I'm showing a loading animation when ajax:before gets fired and remove this animation on ajax:complete.
In the above case, if I clock on "next" the ajax:before gets called, but ajax:complete is missing.

@rails-bot rails-bot bot removed the stale label Mar 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.