Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#57552 closed defect (bug) (fixed)

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

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

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.


4 years 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
4 years ago

  • Keywords gutenberg-merge added

@wildworks commented on PR #3906:


4 years 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:


4 years ago
#4

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

@hellofromTonya commented on PR #3906:


4 years ago
#5

Currently reviewing for commit.

#6 @hellofromTonya
4 years ago

  • Milestone Awaiting Review6.2
  • Owner set to hellofromTonya
  • Status newreviewing

Self-assigning for review and commit.

#7 @hellofromTonya
4 years ago

  • Keywords commit added

PR 3906 is ready for commit. Prepping now.

#8 @hellofromTonya
4 years ago

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

#9 @hellofromTonya
4 years ago

  • Type enhancementdefect (bug)

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

#10 @hellofromTonya
4 years ago

  • Resolutionfixed
  • Status reviewingclosed

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.