jquery-ujs icon indicating copy to clipboard operation
jquery-ujs copied to clipboard

Chrome: link_to with method :patch or :delete don't execute js response after first click

Open steven-ferguson opened this issue 10 years ago • 2 comments

On Chrome the following link_to helper will execute the js response once, but not for any subsequent clicks. It still correctly sends the request to the server, but the server's response is not handled on any requests after the first. Everything worked as expected in Safari.

link_to 'Update resource', resource_path(id: 1), method: :patch, remote: true

#views/resources/update.js.erb

alert('hello world');

steven-ferguson avatar Jul 20 '14 05:07 steven-ferguson

@steven-ferguson does PUT works as expected to you? I believe this might some browser issue and not something strictly related to jquery-ujs.

lucasmazza avatar Aug 07 '14 01:08 lucasmazza

I have this issue as well.. using method: :delete works on first run, but on other runs it doesn't. server code works properly yet browser doesn't run the code returned.

problem occurs only in chrome

more details in a SO question - http://stackoverflow.com/questions/24236597/client-doesnt-get-a-response-from-rails

guyisra avatar Sep 02 '14 19:09 guyisra