Open abhinavmsra opened 2 years ago
Hey @abhinavmsra, thanks for opening this issue!
It seems like that this is a Chrome thing, where Chrome tries to "warn" you about if a blocking event-handler is taking a long time to complete, which is usually not what you want.
But in this case, this is how Turbo works. It will fetch the new (stream) content in the background and waits for that response to come back in order to process it.
I'm wondering if we can improve this event-handling in Turbo so it's not actually blocking/waiting in the event handler for the response but deferring the processing of the response in a different part of the code.
At any rate, I think this is just an "ugly" error in the console, but shouldn't cause any harm or restrict any functionality.
@abhinavmsra this does look like a bug, yes. You should be able to use data-turbo-stream
on links without error.
@seanpdoyle it looks like we're seeing this error in a few situations now, but not always with streams. From a quick look I think we started seeing it after #650. An example not involving streams that triggers this error is if you click the back button before a visit has completed. Does this ring any bells for you?
I added data-turbo-stream=true
to my <a href=...
, but I don't get text/vnd.turbo-stream.html
in my XHR requests to the server, any idea why?
UPDATE: I switched to "^7.2.0-beta.2"
and now it works.
Description
data-turbo-stream=true
to a link.This triggers a turbo stream request, all good till now.
ISSUE
Every click on such links constantly trigger JS errors.
Wonder if links are not supposed to use
data-turbo-stream="true"
or its a different issue?I am using