fix: Possible fix for #7161

This commit is contained in:
Tom Moor
2024-06-29 14:47:26 -07:00
parent ed496bdf60
commit 5aa5ba0aa1

View File

@@ -348,6 +348,9 @@ function SuggestionsMenu<T extends MenuItem>(props: Props<T>) {
const handleFilesPicked = async (
event: React.ChangeEvent<HTMLInputElement>
) => {
// Re-focus the editor as it loses focus when file picker is opened on iOS
view.focus();
const { uploadFile, onFileUploadStart, onFileUploadStop } = props;
const files = getEventFiles(event);
const parent = findParentNode((node) => !!node)(view.state.selection);