mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
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 } });
|
const transaction = view.state.tr.insert(pos - 1, node).setMeta(uploadKey, { remove: { id } });
|
||||||
|
|
||||||
view.dispatch(transaction);
|
view.dispatch(transaction);
|
||||||
view.focus();
|
if (view.hasFocus()) view.focus();
|
||||||
editor.storage.image.uploadInProgress = false;
|
editor.storage.image.uploadInProgress = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
removePlaceholder(editor, view, id);
|
removePlaceholder(editor, view, id);
|
||||||
|
Loading…
Reference in New Issue
Block a user