You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-13 00:10:37 +02:00
Desktop: Accessibility: Improve note title focus handling (#10932)
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import { CommandRuntime, CommandDeclaration } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { FocusElementOptions } from '../../../commands/focusElement';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'focusElementNoteBody',
|
||||
@ -10,8 +11,8 @@ export const declaration: CommandDeclaration = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Old code before rule was applied
|
||||
export const runtime = (comp: any): CommandRuntime => {
|
||||
return {
|
||||
execute: async () => {
|
||||
comp.editorRef.current.execCommand({ name: 'editor.focus' });
|
||||
execute: async (_context: unknown, options?: FocusElementOptions) => {
|
||||
comp.editorRef.current.execCommand({ name: 'editor.focus', value: options });
|
||||
},
|
||||
enabledCondition: 'oneNoteSelected',
|
||||
};
|
||||
|
Reference in New Issue
Block a user