@portabletext/editor 6.5.0 → 6.5.1

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
@@ -4399,7 +4399,7 @@ const RestoreDOM = IS_ANDROID ? RestoreDOMComponent : ({
4399
4399
  }
4400
4400
  for (const op of deferredOperations.current)
4401
4401
  op();
4402
- deferredOperations.current = [], ReactEditor.isFocused(editor) || handleNativeHistoryEvents(editor, editorActor, event.nativeEvent);
4402
+ deferredOperations.current = [], !ReactEditor.isFocused(editor) && isDOMNode(event.target) && DOMEditor.hasEditableTarget(editor, event.target) && handleNativeHistoryEvents(editor, editorActor, event.nativeEvent);
4403
4403
  }
4404
4404
  }, [attributes.onInput, editor, editorActor]),
4405
4405
  onBlur: useCallback((event) => {
@@ -13218,6 +13218,10 @@ const addAnnotationOperationImplementation = ({
13218
13218
  const filteredProps = {};
13219
13219
  for (const key of Object.keys(operation.props))
13220
13220
  if (!(key === "_type" || key === "children")) {
13221
+ if (key === "_key") {
13222
+ filteredProps[key] = operation.props[key];
13223
+ continue;
13224
+ }
13221
13225
  if (key === "style") {
13222
13226
  context.schema.styles.some((style) => style.name === operation.props[key]) && (filteredProps[key] = operation.props[key]);
13223
13227
  continue;