mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-02 11:42:53 +02:00
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
This commit is contained in:
@@ -176,7 +176,7 @@ const Event = ({ event, targetRange, selection }) => {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<StringCell
|
<StringCell
|
||||||
value={event.dataTransfer && event.dataTransfer.get('text/plain')}
|
value={event.dataTransfer && event.dataTransfer.getData('text/plain')}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
Reference in New Issue
Block a user