fix: input in create link button popover closing keyboard - #2982
Draft
matthewlipski wants to merge 7 commits into
Draft
fix: input in create link button popover closing keyboard#2982matthewlipski wants to merge 7 commits into
matthewlipski wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where tapping the create link button in the formatting toolbar on Android Chrome closes the virtual keyboard as well as the toolbar. The reason this happens is that tapping the button opens a popover, which immediately gets autofocused. Chrome on Android bugs out when there's not a certain amount of space below an input in a popover, making the virtual keyboard open and immediately dismiss when tapping the input, or focusing it in any other way:
1000001130.mov
This is fixed in the PR by calling
scrollIntoViewon the input just before the focus moves to it. However, it messes up the scroll position in the document. I've tried resetting the scroll position back to the selection usingscrollToandtransaction.scrollIntoViewin a timeout, but couldn't get this working.The issue is reproducible on BrowserStack - you should be able to compare the previews of this PR and #2939 side-by-side.
Rationale
Changes
Impact
Testing
Screenshots/Video
Checklist
Additional Notes