Make WordPress Core

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

IE11 Undefined reference when creating empty block in page

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


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
14 months ago

  • Component changed from General to Editor

#2 @afercia
14 months 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
14 months ago

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


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 14 months ago by aduth (previous) (diff)

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

14 months ago

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

14 months ago

#6 @johnbillion
14 months ago

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

#7 @jorgefilipecosta
14 months 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.