slate-react 0.69.0 → 0.69.1-2021928194431

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # slate-react
2
2
 
3
+ ## 0.69.1-2021928194431
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4636](https://github.com/ianstormtaylor/slate/pull/4636) [`9e8d5e2b`](https://github.com/ianstormtaylor/slate/commit/9e8d5e2b9bbff1ec7161e292635a074ba3538774) Thanks [@cmmartin](https://github.com/cmmartin)! - Fixes drop actions in editors rendered in iFrames.
8
+
3
9
  ## 0.69.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.es.js CHANGED
@@ -2463,7 +2463,7 @@ var ReactEditor = {
2463
2463
  var domRange;
2464
2464
  var {
2465
2465
  document
2466
- } = window; // COMPAT: In Firefox, `caretRangeFromPoint` doesn't exist. (2016/07/25)
2466
+ } = ReactEditor.getWindow(editor); // COMPAT: In Firefox, `caretRangeFromPoint` doesn't exist. (2016/07/25)
2467
2467
 
2468
2468
  if (document.caretRangeFromPoint) {
2469
2469
  domRange = document.caretRangeFromPoint(x, y);
@@ -2512,11 +2512,8 @@ var ReactEditor = {
2512
2512
 
2513
2513
  if (leafNode) {
2514
2514
  textNode = leafNode.closest('[data-slate-node="text"]');
2515
-
2516
- var _window = ReactEditor.getWindow(editor);
2517
-
2518
- var range = _window.document.createRange();
2519
-
2515
+ var window = ReactEditor.getWindow(editor);
2516
+ var range = window.document.createRange();
2520
2517
  range.setStart(textNode, 0);
2521
2518
  range.setEnd(nearestNode, nearestOffset);
2522
2519
  var contents = range.cloneContents();