fix: set focus on editor conditionally after image upload (#4387)
This commit is contained in:
parent
f5f683b8b8
commit
967ad77078
1 changed files with 1 additions and 1 deletions
|
|
@ -158,7 +158,7 @@ export async function startImageUpload(
|
|||
const transaction = view.state.tr.insert(pos - 1, node).setMeta(uploadKey, { remove: { id } });
|
||||
|
||||
view.dispatch(transaction);
|
||||
view.focus();
|
||||
if (view.hasFocus()) view.focus();
|
||||
editor.storage.image.uploadInProgress = false;
|
||||
} catch (error) {
|
||||
removePlaceholder(editor, view, id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue