-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Package] Interactivity Router/packages/interactivity-router/packages/interactivity-router[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
The <style>
or <link rel=stylesheet>
elements inside <noscript>
sections are handled as if they were placed outside and applied to the page after client-side navigation, which is not correct. These elements can be simply ignored, as the Interactivity API doesn't work without JavaScript.
Step-by-step reproduction instructions
- Add a block of HTML in a template with a Query Loop block, with a
<noscript>
element and a<style>
tag that changes the body background within. E.g.:<noscript><style>body{ background: red !important; }</style></noscript>
- Ensure "force page reload" is disabled in the Query Loop block.
- Visit a page with the modified template.
- Navigate to the next page.
- The body background color wrongly changes.
Screenshots, screen recording, code snippet
Recording |
---|
Screen.Recording.2025-07-23.at.14.23.10.mov |
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- Yes
Please confirm which theme type you used for testing.
- Block
- Classic
- Hybrid (e.g. classic with theme.json)
- Not sure
Metadata
Metadata
Assignees
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Package] Interactivity Router/packages/interactivity-router/packages/interactivity-router[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended