1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-21 06:31:28 +02:00

fix: drag and drop in iframes (#4506) (#4636)

* fix: drag and drop in iframes (#4506)

* Create changeset

* Update iframe-drop-actions.md
This commit is contained in:
Charlie Martin
2021-10-28 15:36:46 -04:00
committed by GitHub
parent 35abac13b0
commit 9e8d5e2b9b
2 changed files with 6 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'slate-react': patch
---
Fixes drop actions in editors rendered in iFrames.

View File

@@ -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) {