-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Too many bugs in composition mode #2718
Comments
Testing this briefly, it looks like it’s the first change to the editor that can’t be un-done: I couldn’t reproduce the issue with replacing text, do you have more detailed steps @szrenwei? |
see this pomelovico/keep#30 |
How/where would I implement this to get it to work? I'm still fairly new/learning but I feel like this might be just what I need! |
You just need to listen to comositionstart event when your editor mounted (like componentDidMount) |
Thank you! |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. You can use this jsfiddle to get started: https://jsfiddle.net/gmertk/e61z7nfa/.
Just go to the official site to try: https://draftjs.org/
What is the expected behavior?
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
version >= 0.11.0 all have these problems, I notice that you have changed the composition handler, that is the cause of these bugs.
like this: https://github.com/facebook/draft-js/blob/master/src/component/handlers/composition/DraftEditorCompositionHandler.js#L256, the author must be
drunk when he write the code,
EditorState.push
has push the samecontentState
, this line of code just useless.The text was updated successfully, but these errors were encountered: