Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialize autofocus selection in createView #2212

Merged

Conversation

BrianHung
Copy link
Contributor

Right now, the initial selection because it is undefined in EditorState.create is equal to Selection.atStart.
Expected behavior is that if autofocus is defined, it is equal to the selection created on first focus.

Example use-case is if autofocus='end', then within a ProseMirror plugin init method: state.doc.selection should equal Selection.atEnd instead of Selection.atStart.

@netlify
Copy link

netlify bot commented Nov 30, 2021

✔️ Deploy Preview for tiptap-embed ready!

🔨 Explore the source changes: eeae323

🔍 Inspect the deploy log: https://app.netlify.com/sites/tiptap-embed/deploys/61a89478e19aed0008273414

😎 Browse the preview: https://deploy-preview-2212--tiptap-embed.netlify.app

@philippkuehn
Copy link
Contributor

Great, but would be great if you can fix these linting errors! ✌️

@philippkuehn philippkuehn merged commit de39853 into ueberdosis:main Dec 3, 2021
@philippkuehn
Copy link
Contributor

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants