Skip to content

feat: add keyboardOffset and the shared page scroll math - #45

Open
SectionTN wants to merge 2 commits into
build/emscripten-7.0.1from
feat/page-keyboard-core
Open

SectionTN wants to merge 2 commits into
build/emscripten-7.0.1from
feat/page-keyboard-core

Conversation

@SectionTN

Copy link
Copy Markdown
Owner

an editor that sizes to its text inside a page leaves its caret under the keyboard. the page has to scroll, and only the editor knows where the caret row is. the core now computes that scroll from the caret row, the visible part of the scroller, the keyboard's top and the range the scroller has left, so Android, iOS and the web share one rule.

keyboardOffset is for a key row in a KeyboardStickyView. it covers the editor's bottom rows while the keyboard is up, and the only way to keep the caret clear of it was a contentInsets.bottom that also stays with the keyboard down. the prop raises the keyboard's top by that much while the keyboard is up, and negative values count as 0. this PR only passes it to the three views, the platform PRs use it.

the web, Android and iOS PRs each sit on this one and can merge in any order, the docs PR goes last.

stacked on #44 (its own commits)

An editor that sizes to its text inside a page leaves its caret under the keyboard: the page has to
scroll, and only the editor knows where the caret row is. The core now computes that scroll from
the caret row, the scroller's visible band, the keyboard's top raised by an offset and the range
the scroller has left, so Android, iOS and the web share one rule.
A key row in a KeyboardStickyView covers the editor's bottom rows while the keyboard is up, and the
only way to keep the caret clear of it was a contentInsets.bottom that also stays with the keyboard
down. keyboardOffset raises the keyboard's top by that much while it is up. The prop reaches the
Android, iOS and web views here, and negative values count as 0.
@coderabbitai

coderabbitai Bot commented Nov 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fedd8a97-113f-4d20-86e8-c6b969642b54

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

This branch has not been deployed

No deployments
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.

1 participant