Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor: Apply IE11 input fix only when mounting TinyMCE #12335

Merged
merged 1 commit into from
Nov 27, 2018

Conversation

aduth
Copy link
Member

@aduth aduth commented Nov 26, 2018

Related: #12234 (comment)

This pull request seeks to resolve an error which will occur when unmounting an instance of the RichText component in IE11. As of #12234, the ref callback handler was not accounting for the null value being passed during unmounting of the component, thus resulting in errors when subsequent logic would attempt to reference properties as if it were an DOM node.

React will call the ref callback with the DOM element when the component mounts, and call it with null when it unmounts.

https://reactjs.org/docs/refs-and-the-dom.html#callback-refs

Testing instructions:

In Internet Explorer 11 and your preferred browser, ensure that no errors are logged when removing a paragraph block:

  1. Navigate to Posts > Add New
  2. Click the writing prompt
  3. Press Backspace

@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable labels Nov 26, 2018
@aduth aduth requested a review from ellatrix November 26, 2018 22:00
@aduth aduth mentioned this pull request Nov 26, 2018
4 tasks
@aduth aduth merged commit 640b2ff into master Nov 27, 2018
@aduth aduth deleted the fix/tinymce-ie11-unmount-error branch November 27, 2018 13:29
@youknowriad youknowriad added this to the 4.6 milestone Nov 29, 2018
@mtias mtias added the Browser Issues Issues or PRs that are related to browser specific problems label Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Browser Issues Issues or PRs that are related to browser specific problems [Feature] Rich Text Related to the Rich Text component that allows developers to render a contenteditable [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants