Fixing keyboard support in Drawers #1938
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Platforms Impacted
Description of changes
In #1936 , there was a bug fix for drawers not being able to support expand with keyboard if the drawer was presented in a custom-set origin. This is because we automatically calculate the frame origin on
contentFrame.maxY - contentSize.height
, which is not necessarily always the correct origin especially if a keyboard is in use. The keyboard height code is also simplified so that it is more accurate in the presentation calculations.Binary change
(how is our binary size impacted -- see https://github.com/microsoft/fluentui-apple/wiki/Size-Comparison)
Verification
Manual tests below, no change should be observed, since the bug was found in the PopupMenuController that had a search bar. Hypothetically, if a drawer with a unique origin point that goes up prompts a keyboard to appear, the bug should appear. This should also only affect presentations that go
.up
.Example (pre bug-fix):
Visual Verification
Pull request checklist
This PR has considered: