diff --git a/packages/core/src/commands/focus.ts b/packages/core/src/commands/focus.ts index edcb48ecb..0d7bf1bec 100644 --- a/packages/core/src/commands/focus.ts +++ b/packages/core/src/commands/focus.ts @@ -1,7 +1,6 @@ import { isTextSelection } from '../helpers/isTextSelection.js' import { resolveFocusPosition } from '../helpers/resolveFocusPosition.js' import { FocusPosition, RawCommands } from '../types.js' -import { isiOS } from '../utilities/isiOS.js' declare module '@tiptap/core' { interface Commands { @@ -43,11 +42,7 @@ export const focus: RawCommands['focus'] = (position = null, options = {}) => ({ } const delayedFocus = () => { - // focus within `requestAnimationFrame` breaks focus on iOS - // so we have to call this - if (isiOS()) { - (view.dom as HTMLElement).focus() - } + (view.dom as HTMLElement).focus() // For React we have to focus asynchronously. Otherwise wild things happen. // see: https://github.com/ueberdosis/tiptap/issues/1520