@mdxeditor/editor 1.2.0 → 1.2.2

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
  },
@@ -204,6 +204,7 @@ function ImageEditor({ src, title, alt, nodeKey, width, height }) {
204
204
  )), draggable && isFocused && !disableImageResize && /* @__PURE__ */ React__default.createElement(ImageResizer, { editor, imageRef, onResizeStart, onResizeEnd }), /* @__PURE__ */ React__default.createElement(
205
205
  "button",
206
206
  {
207
+ type: "button",
207
208
  className: classNames(styles.iconButton, styles.editImageButton),
208
209
  title: "Edit image",
209
210
  onClick: () => {
@@ -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.2",
13
13
  "description": "React component for rich text markdown editing",
14
14
  "scripts": {
15
15
  "build": "vite build",
@@ -41,7 +41,6 @@
41
41
  "@codemirror/view": "^6.21.0",
42
42
  "@codesandbox/sandpack-react": "^2.6.7",
43
43
  "@lexical/clipboard": "^0.12.2",
44
- "@lexical/code": "^0.12.2",
45
44
  "@lexical/link": "^0.12.2",
46
45
  "@lexical/list": "^0.12.2",
47
46
  "@lexical/markdown": "^0.12.2",