-
Notifications
You must be signed in to change notification settings - Fork 4.9k
enqueue_block_assets hook loads scripts twice #53590
Copy link
Copy link
Open
Labels
[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
Activity
Metadata
Metadata
Assignees
Labels
[Feature] BlocksOverall functionality of blocksOverall functionality of blocks[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Description
Latest update gives us option to load some scripts and styles in Iframe, which is great.
The problem is that it's loading everything twice in the Site editor - outside iframe and inside iframe. This makes some scripts execute twice and break them
Is it possible to load only in an iframe on the Site editor? I think it can be correct if we check if current page has iframed content and if yes, then we load only in an iframe, if not, we load outside iframe
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
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