forked from github/plane
fix: set focus on editor conditionally after image upload (#4387)
This commit is contained in:
parent
f5f683b8b8
commit
967ad77078
@ -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…
Reference in New Issue
Block a user