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

Fix for get response html/text in locked body #364

Merged
merged 2 commits into from
Sep 1, 2021

Conversation

ferdyrurka
Copy link
Contributor

Hi,

I detected a small bug during migrating from turbolinks to turbo. :)

Zrzut ekranu z 2021-08-30 20-19-56

It appears when he wants to get responseHTML or responeText on event: turbo: before-fetch-response

@dhh
Copy link
Member

dhh commented Aug 30, 2021

Nice. Could you add a test as well?

@ferdyrurka
Copy link
Contributor Author

sure, tomorrow I will add tests :)

@marphi
Copy link

marphi commented Aug 31, 2021

@ferdyrurka Does this pr resolve issue #19?

@ferdyrurka
Copy link
Contributor Author

@marphi yes :)

I checked this use case it with the following code:

document.addEventListener('turbo:submit-end',  async (event) => {
    console.log(await event.detail.fetchResponse.responseHTML)
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants