fix: input in create link button popover closing keyboard - #2982
fix: input in create link button popover closing keyboard#2982matthewlipski wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks 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: |
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