mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-21 06:31:28 +02:00
* fix: drag and drop in iframes (#4506) * Create changeset * Update iframe-drop-actions.md
This commit is contained in:
5
.changeset/iframe-drop-actions.md
Normal file
5
.changeset/iframe-drop-actions.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'slate-react': patch
|
||||
---
|
||||
|
||||
Fixes drop actions in editors rendered in iFrames.
|
@@ -429,7 +429,7 @@ export const ReactEditor = {
|
||||
|
||||
// Else resolve a range from the caret position where the drop occured.
|
||||
let domRange
|
||||
const { document } = window
|
||||
const { document } = ReactEditor.getWindow(editor)
|
||||
|
||||
// COMPAT: In Firefox, `caretRangeFromPoint` doesn't exist. (2016/07/25)
|
||||
if (document.caretRangeFromPoint) {
|
||||
|
Reference in New Issue
Block a user