mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Patch for IQKeyboardManager issue.
This commit is contained in:
@@ -233,6 +233,17 @@ export class Frame extends frameCommon.Frame {
|
||||
var navigationBar = this._ios.controller.navigationBar;
|
||||
return (navigationBar && !this._ios.controller.navigationBarHidden) ? navigationBar.frame.size.height : 0;
|
||||
}
|
||||
|
||||
public _setNativeViewFrame(nativeView: UIView, frame: CGRect) {
|
||||
// HACK: The plugin https://github.com/hackiftekhar/IQKeyboardManager offsets our Frame's 'nativeView.frame.origin.y'
|
||||
// to a negative value so the currently focused TextField/TextView is always on the screen while the soft keyboard is showing.
|
||||
// Our Frame always wants to have an origin of {0, 0}, so if someone else has been playing with origin.x or origin.y do not bring it back to {0, 0}.
|
||||
if (nativeView.frame.size.width === frame.size.width && nativeView.frame.size.height === frame.size.height) {
|
||||
return;
|
||||
}
|
||||
|
||||
super._setNativeViewFrame(nativeView, frame);
|
||||
}
|
||||
}
|
||||
|
||||
class UINavigationControllerImpl extends UINavigationController implements UINavigationControllerDelegate {
|
||||
|
||||
Reference in New Issue
Block a user