forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use WindowInsetsCompat for Keyboard Events (facebook#35897)
Summary: Pull Request resolved: facebook#35897 Fixes facebook#35894 Android 11 added native support for querying whether the IME is present along with its size, as part of the WindowInsets API. D38500859 (facebook@1e48274) changed our logic for Android keyboard events to use it when available, fixing a longstanding issues where we could not reliably tell where the keyboard was open depending on softInputMode. An androidx library WindowInsetsCompat aimed to backport some of the functionality to older versions of Android, with the same API, documenting IME queries to work down to API level 23 (Android 6). I used this, so that we would be able to remove our own logic for detecting keyboard insets once we supported 23+. From an issue report, WindowInsetsCompat is not accurately returning whether the IME is open on at least Android 9. So this change makes it so we only use WindowInsets methods when they are provided by the OS (a tested golden path), and otherwise use the previously working heuristics on anything older. Changelog: [Android][Fixed] - Do not use WindowInsetsCompat for Keyboard Events Reviewed By: christophpurrer Differential Revision: D42604176 fbshipit-source-id: da6a0bbc34c36f8e6d4e4ac07bc96da048fd6aa8
- Loading branch information
1 parent
f3696bb
commit 19c9eea
Showing
1 changed file
with
38 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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