Skip to content

fix: native rounded keyboard detection#1415

Merged
kirillzyusko merged 5 commits intomainfrom
feat/native-rounded-keyboard-detection
Mar 31, 2026
Merged

fix: native rounded keyboard detection#1415
kirillzyusko merged 5 commits intomainfrom
feat/native-rounded-keyboard-detection

Conversation

@kirillzyusko
Copy link
Copy Markdown
Owner

@kirillzyusko kirillzyusko commented Mar 30, 2026

📜 Description

Added keyboardBorderRadius variable as exported constant from this module.

💡 Motivation and Context

On iOS 26 keyboard started to have a rounded corners. However, if you compile app with XCode 26 or if you intentionally disable new keyboard via plist file you will get old keyboard. At the moment KeyboardToolbar relies on iOS 26 presence only and it may cause inconsistencies.

In this PR I'm fixing it by adding an exported constant that indicates a radius of keyboard. Now we can compare it with 0 to understand which exactly keyboard is shown.

These changes will also need to be present to make #1409 working across all devices 🤞

📢 Changelog

JS

  • declared getConstants method on native module;
  • updated TS spec and included new method signature;
  • declared KEYBOARD_BORDER_RADIUS in constants file;
  • used KEYBOARD_BORDER_RADIUS in KeyboardToolbar code.

iOS

  • added usesModernKeyboard helper;
  • added constantsToExport/getConstants module method;

Android

  • added keyboardBorderRadius variable as exported constant;
  • added getConstants method to module;

🤔 How Has This Been Tested?

Tested manually fabric/paper on iPhone 15 (iOS 15.5)/iPhone 17 Pro (iOS 26.2)/Pixel 9 Pro (API 35).

📸 Screenshots (if appropriate):

image

📝 Checklist

  • CI successfully passed
  • I added new mocks and corresponding unit-tests if library API was changed

@kirillzyusko kirillzyusko self-assigned this Mar 30, 2026
@kirillzyusko kirillzyusko added refactor You changed the code but it didn't affect functionality KeyboardToolbar Anything related to KeyboardToolbar component labels Mar 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 30, 2026

📊 Package size report

Current size Target Size Difference
309906 bytes 309372 bytes 534 bytes 📈

@kirillzyusko kirillzyusko changed the title feat: native rounded keyboard detection fix: native rounded keyboard detection Mar 31, 2026
@kirillzyusko kirillzyusko force-pushed the feat/native-rounded-keyboard-detection branch from e5e5056 to dfa89f5 Compare March 31, 2026 07:29
@kirillzyusko kirillzyusko added the e2e Anything about E2E tests label Mar 31, 2026
@kirillzyusko kirillzyusko marked this pull request as ready for review March 31, 2026 07:44
@kirillzyusko kirillzyusko merged commit f83e78c into main Mar 31, 2026
26 checks passed
@kirillzyusko kirillzyusko deleted the feat/native-rounded-keyboard-detection branch March 31, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Anything about E2E tests KeyboardToolbar Anything related to KeyboardToolbar component refactor You changed the code but it didn't affect functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant