Skip to content

Allow setting turbo-suppress-warning on body element #1423

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

redross
Copy link

@redross redross commented Aug 5, 2025

The warning previously made it look like placing the data-turbo-suppress-warning attribute on the body element would suppress it, but in fact, only the script tag was being checked for this attribute.

Now, data-turbo-suppress-warning on the body element will also suppress the warning.

The script tag check is kept unchanged to avoid breaking existing code.

The warning message has been updated to mention both possibilities (script tag and body tag) as valid places for
data-turbo-suppress-warning.

Before:
Screenshot from 2025-08-05 10-39-45

Notice the data-turbo-suppress-warning attribute already present on the body tag, while the message suggests adding it

After:
Screenshot from 2025-08-05 12-45-18

The body tag no longer has the data-turbo-suppress-warning attribute, because the warning would no longer appear if it had it

The warning previously made it look like placing the
data-turbo-suppress-warning attribute on the body element would suppress
it, but in fact, only the script tag was being checked for this
attribute.

Now, data-turbo-suppress-warning on the body element will also suppress
the warning.

The script tag check is kept unchanged to avoid breaking existing code.

The warning message has been updated to mention both possibilities
(script tag and body tag) as valid places for
data-turbo-suppress-warning.
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.

1 participant