mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 12:14:14 +02:00
Fix exception in Input Tester example (#2278)
* Fix bolded text in input-tester initial value * Fix crash on Input Tester example with certain input events If an Input event with inputType "insertReplacementText" is received, the example crashes because "event.dataTransfer.get is not a function" The correct API is `getData()`, not `get()`. Ref: https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/getData * Revert "Fix bolded text in input-tester initial value" This reverts commit82e1213be3
. * Revert "Revert "Fix bolded text in input-tester initial value"" This reverts commitb5a0a2440f
.
This commit is contained in:
committed by
Ian Storm Taylor
parent
115cf469b9
commit
abc75bb45e
@@ -176,7 +176,7 @@ const Event = ({ event, targetRange, selection }) => {
|
||||
</td>
|
||||
<td>
|
||||
<StringCell
|
||||
value={event.dataTransfer && event.dataTransfer.get('text/plain')}
|
||||
value={event.dataTransfer && event.dataTransfer.getData('text/plain')}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user