@mdxeditor/editor 1.2.0 → 1.2.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.
@@ -13,7 +13,8 @@ const PropertyPopover = ({ title, properties, onChange }) => {
13
13
  onSubmit: (e) => {
14
14
  void handleSubmit(onChange)(e);
15
15
  setOpen(false);
16
- e.nativeEvent.stopImmediatePropagation();
16
+ e.preventDefault();
17
+ e.stopPropagation();
17
18
  }
18
19
  },
19
20
  /* @__PURE__ */ React__default.createElement("h3", { className: styles.propertyPanelTitle }, title, " Attributes"),
@@ -51,7 +51,7 @@ const FrontmatterEditor = ({ yaml, onChange }) => {
51
51
  {
52
52
  onSubmit: (e) => {
53
53
  void handleSubmit(onSubmit)(e);
54
- e.nativeEvent.stopImmediatePropagation();
54
+ e.stopPropagation();
55
55
  },
56
56
  onReset: () => setFrontmatterDialogOpen(false)
57
57
  },
@@ -40,7 +40,8 @@ const ImageDialog = () => {
40
40
  onSubmit: (e) => {
41
41
  void handleSubmit(saveImage)(e);
42
42
  reset({ src: "", title: "", altText: "" });
43
- e.nativeEvent.stopImmediatePropagation();
43
+ e.preventDefault();
44
+ e.stopPropagation();
44
45
  },
45
46
  className: styles.multiFieldForm
46
47
  },
@@ -32,7 +32,8 @@ function LinkEditForm({ url, title, onSubmit, onCancel, linkAutocompleteSuggesti
32
32
  {
33
33
  onSubmit: (e) => {
34
34
  void handleSubmit(onSubmit)(e);
35
- e.nativeEvent.stopImmediatePropagation();
35
+ e.stopPropagation();
36
+ e.preventDefault();
36
37
  },
37
38
  onReset: onCancel,
38
39
  className: classNames(styles.multiFieldForm, styles.linkDialogEditForm)
@@ -77,7 +77,7 @@ const DialogForm = ({ autocompleteSuggestions, onSubmitCallback, dialogInputPlac
77
77
  };
78
78
  const onSubmitEH = (e) => {
79
79
  e.preventDefault();
80
- e.nativeEvent.stopImmediatePropagation();
80
+ e.stopPropagation();
81
81
  onSubmitCallback(inputProps.value);
82
82
  };
83
83
  const dropdownIsVisible = isOpen && items.length > 0;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "private": false,
10
10
  "sideEffects": false,
11
11
  "type": "module",
12
- "version": "1.2.0",
12
+ "version": "1.2.1",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",