Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken keyboard layout after changing styles
I'm assuming the motivation for the previous implementation is from https://developer.apple.com/documentation/uikit/uiappearance : > iOS applies appearance changes when a view enters a window, but it > doesn’t change the appearance of a view that’s already in a window. To > change the appearance of a view that’s currently in a window, remove the > view from the view hierarchy and then put it back. Note that we're removing views from not just our own application windows, but all windows (including the keyboard window). By ignoring the keyboard window, my layout issues go away. Previous steps to reproduce: 1. add a map and an input field to the view hierarchy 2. make input field first responder to present keyboard (thus adds keyboard window to application) 3. present another MapView modally (triggers `applyStyle`, which in turn re-adds every view from every window. 4. dismiss the modal mapview 5. make input field first responder again At this point, the views in my application all seem to be inexplicably offset by the keyboard height.
- Loading branch information