mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 14:25:08 +08:00
Fix InputAccessoryView safe area when not attached to a TextInput (#21179)
Summary: When using an InputAccessoryView attached to a TextInput the safe area insets are not applied properly. This uses different autolayout constraints that works in all cases I tested, roughly based on the technique used here https://github.com/stockx/SafeAreaInputAccessoryViewWrapperView/blob/master/SafeAreaInputAccessoryViewWrapperView/Classes/SafeAreaInputAccessoryViewWrapperView.swift#L38. Pull Request resolved: https://github.com/facebook/react-native/pull/21179 Differential Revision: D9928503 Pulled By: hramos fbshipit-source-id: b1b623334558093042fd94ac85e1b52dd16aa1a0
This commit is contained in:
committed by
Facebook Github Bot
parent
a0f7d6090f
commit
2191eecf54
@@ -42,7 +42,7 @@
|
||||
|
||||
- (void)reactSetFrame:(CGRect)frame
|
||||
{
|
||||
[_inputAccessoryView setFrame:frame];
|
||||
[_inputAccessoryView reactSetFrame:frame];
|
||||
|
||||
if (_shouldBecomeFirstResponder) {
|
||||
_shouldBecomeFirstResponder = NO;
|
||||
|
||||
Reference in New Issue
Block a user