@mdxeditor/editor 3.21.0 → 3.21.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.
@@ -190,30 +190,32 @@ const openLinkEditDialog$ = Action((r) => {
190
190
  ),
191
191
  ([, selection, editor]) => {
192
192
  editor == null ? void 0 : editor.focus(() => {
193
- editor.getEditorState().read(() => {
194
- const node = getLinkNodeInSelection(selection);
195
- const rectangle = getSelectionRectangle(editor);
196
- if (node) {
197
- r.pub(linkDialogState$, {
198
- type: "edit",
199
- initialUrl: node.getURL(),
200
- initialTitle: node.getTitle() ?? "",
201
- url: node.getURL(),
202
- title: node.getTitle() ?? "",
203
- linkNodeKey: node.getKey(),
204
- rectangle
205
- });
206
- } else {
207
- r.pub(linkDialogState$, {
208
- type: "edit",
209
- initialUrl: "",
210
- initialTitle: "",
211
- title: "",
212
- url: "",
213
- linkNodeKey: "",
214
- rectangle
215
- });
216
- }
193
+ setTimeout(() => {
194
+ editor.getEditorState().read(() => {
195
+ const node = getLinkNodeInSelection(selection);
196
+ const rectangle = getSelectionRectangle(editor);
197
+ if (node) {
198
+ r.pub(linkDialogState$, {
199
+ type: "edit",
200
+ initialUrl: node.getURL(),
201
+ initialTitle: node.getTitle() ?? "",
202
+ url: node.getURL(),
203
+ title: node.getTitle() ?? "",
204
+ linkNodeKey: node.getKey(),
205
+ rectangle
206
+ });
207
+ } else {
208
+ r.pub(linkDialogState$, {
209
+ type: "edit",
210
+ initialUrl: "",
211
+ initialTitle: "",
212
+ title: "",
213
+ url: "",
214
+ linkNodeKey: "",
215
+ rectangle
216
+ });
217
+ }
218
+ });
217
219
  });
218
220
  });
219
221
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "*.css"
12
12
  ],
13
13
  "type": "module",
14
- "version": "3.21.0",
14
+ "version": "3.21.2",
15
15
  "description": "React component for rich text markdown editing",
16
16
  "scripts": {
17
17
  "build": "vite build",