Commit 6f2bf66
authored
[Part 2] Pass fresh editorState to edit handlers (facebookarchive#1113)
I had mirrored parts of this change from FB to github but missed some
things. This is the second part of the same change - context below.
Earlier part merged as facebookarchive#1112
---
There have been bugs reported in cases where the users of Draft are
updating 'editorState' in their custom handlers for keyDown, paste, etc.
This can be a problem when they are using an 'editorState' that is in
the parent's props or state and is not in sync, at that moment, with the
editorState in Draft. This allows the parent to use the most updated
editorState in custom handlers.
This change was already reviewed by @spicyj and credit for this fix goes
to @AlaNouri for making this change.1 parent 3a390da commit 6f2bf66
File tree
3 files changed
+15
-5
lines changed- src/component
- base
- handlers/edit
3 files changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
| |||
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
124 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
125 | 131 | | |
126 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
0 commit comments