Skip to content

Commit

Permalink
Fix keyboard doesn't dismiss when opening the attach dialog with a co…
Browse files Browse the repository at this point in the history
…mmand
  • Loading branch information
personalizedrefrigerator committed Dec 6, 2024
1 parent 862adef commit 9b75591
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/app-mobile/components/screens/Note/Note.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ class NoteScreenComponent extends BaseScreenComponent<ComponentProps, State> imp
{
attachFile: this.attachFile.bind(this),
hideKeyboard: () => {
this.editorRef?.current?.hideKeyboard();
if (this.useEditorBeta()) {
this.editorRef?.current?.hideKeyboard();
} else {
Keyboard.dismiss();
}
},
insertText: this.insertText.bind(this),
get dialogs() {
Expand All @@ -338,6 +342,7 @@ class NoteScreenComponent extends BaseScreenComponent<ComponentProps, State> imp
},
},
commands,
true,
);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/lib/services/commands/ToolbarButtonUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class ToolbarButtonUtils {
iconName: command.declaration.iconName,
enabled: newEnabled,
onClick: async () => {
void this.service.execute(commandName);
await this.service.execute(commandName);
void focusEditorIfEditorCommand(commandName, this.service);
},
title: newTitle,
Expand Down

0 comments on commit 9b75591

Please sign in to comment.