@portabletext/editor 6.6.1 → 6.6.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/lib/index.js CHANGED
@@ -3840,7 +3840,13 @@ const RestoreDOM = IS_ANDROID ? RestoreDOMComponent : ({
3840
3840
  if (!el2)
3841
3841
  return;
3842
3842
  const domSelection = getSelection(root2);
3843
- if (activeElement === el2 ? (state.latestElement = activeElement, editor.focused = !0) : editor.focused = !1, !domSelection)
3843
+ if (activeElement === el2)
3844
+ state.latestElement = activeElement, editor.focused = !0;
3845
+ else {
3846
+ editor.focused = !1;
3847
+ return;
3848
+ }
3849
+ if (!domSelection)
3844
3850
  return deselect(editor);
3845
3851
  const {
3846
3852
  anchorNode,
@@ -17062,6 +17068,15 @@ const editorMachine = setup({
17062
17068
  })],
17063
17069
  tags: ["dragging internally"],
17064
17070
  on: {
17071
+ dragstart: {
17072
+ actions: [assign({
17073
+ internalDrag: ({
17074
+ event
17075
+ }) => ({
17076
+ origin: event.origin
17077
+ })
17078
+ })]
17079
+ },
17065
17080
  dragend: {
17066
17081
  target: "idle"
17067
17082
  },