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

Can't paste into editor in IE 11 #897

Closed
jwoldan opened this issue Jun 21, 2017 · 4 comments · Fixed by #1901
Closed

Can't paste into editor in IE 11 #897

jwoldan opened this issue Jun 21, 2017 · 4 comments · Fixed by #1901

Comments

@jwoldan
Copy link

jwoldan commented Jun 21, 2017

A bug exists which prevents pasting text into the editor on IE11. When attempting, nothing is pasted and an error occurs in the getTransferData method.

To Reproduce:

  1. Copy text from anywhere outside the editor
  2. Click in the editor and paste, either using a keyboard shortcut, or by right-clicking and selecting "Paste"

Expected behavior:

The copied text is pasted into the editor

Actual behavior:

Nothing is pasted and a console error occurs.

@ianstormtaylor
Copy link
Owner

Hey @jwoldan thanks, I think this is related to this PR: #882

@jwoldan
Copy link
Author

jwoldan commented Jun 21, 2017

@ianstormtaylor Thanks, looks like it!

@bendulum
Copy link

bendulum commented Dec 6, 2017

Pasting text seems to work in IE11 (Version 11.1176.10586.0), Chrome (Version 62.0.3202.94), and Firefox (Version 56.0) on Windows 10 when removing the lines:

  if (event.nativeEvent) {
    event = event.nativeEvent
  }

from get-event-transfer.js.

As it is now, transfer will always be undefined in the line var transfer = event.dataTransfer || event.clipboardData;.

I'm using:

"react": "15.4.1",
"slate": "^0.31.4",
"slate-plain-serializer": "^0.4.12",
"slate-react": "^0.10.19",

@DylanPaulusSEL
Copy link
Contributor

Getting this error, and came to the same conclusion as @bendulum. Is event.nativeEvent something we need to be checking for? I'll be willing to work on this bug if no one else is currently!

Let me know if this seems to be on the right path. I see two solutions:

  1. Remove the whole if-statement if checking for event.nativeEvent isn't needed.
  2. Using IS_IE from slate-dev-environment, change the if-statement to ignore IE instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants