Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#57552 closed defect (bug) (fixed)

Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in Firefox.

Reported by: wildworks's profile wildworks Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.2 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch gutenberg-merge commit
Focuses: Cc:

Description (last modified by hellofromTonya)

Adds the polyfill script to the iframe to make the inert attribute work correctly in Firefox. This solves the problem that the site editor can operate on the block editor in Firefox even in browse mode.

Why?

The inert attribute is intended to render the element and its sub-tree elements inert, but Firefox doesn't support this attribute. For the inert attribute to work as intended in Firefox, even within an iframe, the script needs to be injected into the iframe as well as the global document.

References:

Change History (11)

This ticket was mentioned in PR #3906 on WordPress/wordpress-develop by @wildworks.


8 months ago
#1

  • Keywords has-patch added

Trac ticket https://core.trac.wordpress.org/ticket/57552

Related Gutenberg PR: https://github.com/WordPress/gutenberg/pull/47398

@Mamaduka @ntsekouras @youknowriad

#2 @Mamaduka
8 months ago

  • Keywords gutenberg-merge added

@wildworks commented on PR #3906:


8 months ago
#3

I am a little concerned that the files changed in Gutenberg are different from the files changed to backport to the WordPress core.
Is this a problem in this case?

@Mamaduka commented on PR #3906:


8 months ago
#4

No, this is correct. I think we need to match core and plugin function names.

@hellofromTonya commented on PR #3906:


8 months ago
#5

Currently reviewing for commit.

#6 @hellofromTonya
8 months ago

  • Milestone changed from Awaiting Review to 6.2
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

Self-assigning for review and commit.

#7 @hellofromTonya
8 months ago

  • Keywords commit added

PR 3906 is ready for commit. Prepping now.

#8 @hellofromTonya
8 months ago

  • Description modified (diff)
  • Summary changed from Backport loading inert polyfill into an iframe to Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in Firefox.

#9 @hellofromTonya
8 months ago

  • Type changed from enhancement to defect (bug)

Reclassifying as a debug. Why? This change is fixing an issue where Firefox doesn't support the inert attribute.

#10 @hellofromTonya
8 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 55181:

Editor: Add 'wp-polyfill' to _wp_get_iframed_editor_assets() for inert attribute in Firefox.

Adds the polyfill script to the iframe to make the inert attribute work correctly in Firefox. This solves the problem that the site editor can operate on the block editor in Firefox even in browse mode.

Why?

The inert attribute is intended to render the element and its sub-tree elements inert, but Firefox doesn't support this attribute. For the inert attribute to work as intended in Firefox, even within an iframe, the script needs to be injected into the iframe as well as the global document.

References:

Follow-up to [53160].

Props wildworks, mamaduka, youknowriad.
Fixes #57552.

Note: See TracTickets for help on using tickets.