Open YevhenTarashchyk opened 1 year ago
@tiptap/extension-character-count,@tiptap/extension-color,@tiptap/extension-history,@tiptap/extension-link,@tiptap/extension-strike,@tiptap/extension-text-align,@tiptap/extension-text-align,@tiptap/extension-text-align,@tiptap/pm,@tiptap/extension-bold,@tiptap/extension-document,@tiptap/extension-font-family,@tiptap/extension-italic,@tiptap/extension-paragraph,@tiptap/extension-text,@tiptap/extension-text-style,@tiptap/extension-underline,@tiptap/html,@tiptap/react
all higher than 2.0.0
I have a page which is scrollable and editor is at the end of a page, so on mount (once component renders) the page scrolls down to editor. I want to get rid of this behavior
const editor = useEditor( { extensions, content: value, autofocus: null, enablePasteRules: true, onUpdate: ( { editor } ) => handleContentChange( editor as Editor ), } )
Tried to change autofocus to different values and nothing helps.
Chrome
No response
Not to scroll to the editor view
I also encountered this issue. You might want to try setting autofocus: false instead of autofocus: null.
Which packages did you experience the bug in?
@tiptap/extension-character-count,@tiptap/extension-color,@tiptap/extension-history,@tiptap/extension-link,@tiptap/extension-strike,@tiptap/extension-text-align,@tiptap/extension-text-align,@tiptap/extension-text-align,@tiptap/pm,@tiptap/extension-bold,@tiptap/extension-document,@tiptap/extension-font-family,@tiptap/extension-italic,@tiptap/extension-paragraph,@tiptap/extension-text,@tiptap/extension-text-style,@tiptap/extension-underline,@tiptap/html,@tiptap/react
What Tiptap version are you using?
all higher than 2.0.0
What’s the bug you are facing?
I have a page which is scrollable and editor is at the end of a page, so on mount (once component renders) the page scrolls down to editor. I want to get rid of this behavior
const editor = useEditor( { extensions, content: value, autofocus: null, enablePasteRules: true, onUpdate: ( { editor } ) => handleContentChange( editor as Editor ), } )
Tried to change autofocus to different values and nothing helps.
What browser are you using?
Chrome
Code example
No response
What did you expect to happen?
Not to scroll to the editor view
Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?