Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Fix DOMObserver mutation data for IE #2285

Closed
wants to merge 1 commit into from

Conversation

jainil
Copy link

@jainil jainil commented Dec 17, 2019

Summary: IE 11 considers the enter keypress that concludes the composition as an input char, which ends up adding a new line to the editor. I am adding code to strip that newline character when processing the mutation event.

Differential Revision: D19141003

Before the fix (notice the \n character, it gets added to the editor):
image

After the fix:
image

Summary: IE 11 considers the enter keypress that concludes the composition as an input char, which ends up adding a new line to the editor. I am adding code to strip that newline character when processing the mutation event.

Differential Revision: D19141003

fbshipit-source-id: fdda84cc70eb5eb5741ee1815d0cad0049354ad9
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D19141003

@facebook-github-bot
Copy link

This pull request has been merged in afb708f.

@facebook-github-bot
Copy link

This pull request has been merged in afb708f.

mmissey pushed a commit to mmissey/draft-js that referenced this pull request Mar 24, 2020
Summary:
Pull Request resolved: facebookarchive#2285

IE 11 considers the enter keypress that concludes the composition as an input char, which ends up adding a new line to the editor. I am adding code to strip that newline character when processing the mutation event.

Reviewed By: mrkev

Differential Revision: D19141003

fbshipit-source-id: 53848e42d0e2b45d609e6623cc5d5579168b73fe
vilemj-Viclick pushed a commit to kontent-ai/draft-js that referenced this pull request Jul 16, 2020
Summary:
Pull Request resolved: facebookarchive#2285

IE 11 considers the enter keypress that concludes the composition as an input char, which ends up adding a new line to the editor. I am adding code to strip that newline character when processing the mutation event.

Reviewed By: mrkev

Differential Revision: D19141003

fbshipit-source-id: 53848e42d0e2b45d609e6623cc5d5579168b73fe
alicayan008 pushed a commit to alicayan008/draft-js that referenced this pull request Jul 4, 2023
Summary:
Pull Request resolved: facebookarchive/draft-js#2285

IE 11 considers the enter keypress that concludes the composition as an input char, which ends up adding a new line to the editor. I am adding code to strip that newline character when processing the mutation event.

Reviewed By: mrkev

Differential Revision: D19141003

fbshipit-source-id: 53848e42d0e2b45d609e6623cc5d5579168b73fe
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants