WordPress.org

Make WordPress Core

Opened 6 weeks ago

Closed 5 weeks ago

#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:

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
6 weeks ago

  • Component changed from General to Editor

#2 @afercia
6 weeks 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
6 weeks 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 6 weeks ago by aduth (previous) (diff)

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


6 weeks ago

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


5 weeks ago

#6 @johnbillion
5 weeks ago

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

#7 @jorgefilipecosta
5 weeks 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.