Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#49516 closed defect (bug) (reported-upstream)

IE11 Undefined reference when creating empty block in page

Reported by: bookdude13's profile bookdude13 Owned by: aduth's profile aduth
Milestone: Priority: normal
Severity: normal Version: 5.4
Component: Editor Keywords:
Focuses: Cc:

Description

Using IE 11 (dev build off of trunk).
When creating a new post, if the cursor is in an empty block and you click enter, a new block is created underneath (normal behavior). This triggers an error in the console - "Impossible to obtain the property 'contains' on a null or undefined reference" in block-editor.js, line 16196:

6194   key: "isSelectionEligibleForScroll",
6195       value: function isSelectionEligibleForScroll() {
6196         return this.props.selectedBlockClientId && this.ref.current.contains(document.activeElement) && document.activeElement.isContentEditable;
6197       }

Change History (7)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Editor

#2 @afercia
3 years ago

  • Milestone changed from Awaiting Review to 5.4

I was able to reproduce this and determine it's a regression in trunk. Testing on WordPress 5.3.2 I get other errors, but not this one.

#3 @aduth
3 years ago

A fix is proposed in the Gutenberg, and could be cherry-picked as a bug fix for WordPress 5.4 once merged:

https://github.com/WordPress/gutenberg/pull/20485

Edit: The pull request has since been merged and should be included as part of the cherry-picked changes for Monday's 5.4-RC1.

Last edited 3 years ago by aduth (previous) (diff)

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


3 years ago

This ticket was mentioned in Slack in #core by david.baumwald. View the logs.


3 years ago

#6 @johnbillion
3 years ago

  • Keywords needs-patch removed
  • Owner set to aduth
  • Status changed from new to assigned

#7 @jorgefilipecosta
3 years ago

  • Milestone 5.4 deleted
  • Resolution set to reported-upstream
  • Status changed from assigned to closed

Closing this ticket as https://github.com/WordPress/gutenberg/pull/20485 is already part of WordPress 5.4.

Note: See TracTickets for help on using tickets.