Draft-js: Edge/Win10 Swipe keyboard corrupt editor state

Created on 28 Aug 2018  路  1Comment  路  Source: facebook/draft-js

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Using Windows 10's swipe keyboardin Edge can corrupt editorstate. Console log display: "Unable to get property 'replaceChild' of undefined or null reference'.
Note:
This only happens if you use the swipe feature at the beginning of a new line.

*If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. *
Can be reproduced on draftjs.org or https://jsfiddle.net/stopachka/m6z0xn4r/.
Steps:

  • Enable Windows 10 Touch Keyboard. This requires a windows device with keyboard detached (tablet mode). It's possible to simulate this environment with VMWare on Mac if you tweak the config to simulate touch support, and force enable tablet mode in settings.
  • Use Edge to open draftjs.org, swipe hello on the Touch keyboard.
  • Observe error in console. At this moment editorstate can be in a bad state. (can't type / delete / error in console).

This is a demo of the steps: https://twitter.com/DevYuze/status/1034207906206429184

Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Edge with Windows 10 Swipe keyboard. Doesn't work in previous version of Draftjs.

bug

Most helpful comment

We have a fix in https://github.com/twitter-forks/draft-js/pull/8 --- going to post a pull request here soon.

>All comments

We have a fix in https://github.com/twitter-forks/draft-js/pull/8 --- going to post a pull request here soon.

Was this page helpful?
0 / 5 - 0 ratings