mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-26 00:27:28 +02:00
fix(Safari): Set a text value in dataTransfer to have the cursor on Safari when dragging a text node (#1927)
This commit is contained in:
committed by
Ian Storm Taylor
parent
d8d0b5ff3c
commit
ec51444df1
@@ -34,6 +34,9 @@ function setEventTransfer(event, type, content) {
|
||||
|
||||
try {
|
||||
transfer.setData(mime, content)
|
||||
// COMPAT: Safari needs to have the 'text' (and not 'text/plain') value in dataTransfer
|
||||
// to display the cursor while dragging internally.
|
||||
transfer.setData('text', transfer.getData('text'))
|
||||
} catch (err) {
|
||||
const prefix = 'SLATE-DATA-EMBED::'
|
||||
const text = transfer.getData(TEXT)
|
||||
|
Reference in New Issue
Block a user