slate-react 0.77.2-20223192094 → 0.77.3

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/dist/index.js CHANGED
@@ -1487,10 +1487,6 @@ var Editable$1 = function Editable(props) {
1487
1487
  _native = false;
1488
1488
  }
1489
1489
  }
1490
- }
1491
-
1492
- if (!_native) {
1493
- event.preventDefault();
1494
1490
  } // COMPAT: For the deleting forward/backward input types we don't want
1495
1491
  // to change the selection because it is the range that will be deleted,
1496
1492
  // and those commands determine that for themselves.
@@ -1508,6 +1504,7 @@ var Editable$1 = function Editable(props) {
1508
1504
  });
1509
1505
 
1510
1506
  if (!selection || !slate.Range.equals(selection, range)) {
1507
+ _native = false;
1511
1508
  var selectionRef = editor.selection && slate.Editor.rangeRef(editor, editor.selection);
1512
1509
  slate.Transforms.select(editor, range);
1513
1510
 
@@ -1516,6 +1513,10 @@ var Editable$1 = function Editable(props) {
1516
1513
  }
1517
1514
  }
1518
1515
  }
1516
+ }
1517
+
1518
+ if (!_native) {
1519
+ event.preventDefault();
1519
1520
  } // COMPAT: If the selection is expanded, even if the command seems like
1520
1521
  // a delete forward/backward command it should delete the selection.
1521
1522