Merge branch 'ppldo-possibility_disable_ios_inputAccessoryView' into develop

This commit is contained in:
Lorenzo Pichilli 2022-04-18 01:27:11 +02:00
commit 75c7473e3e
4 changed files with 14 additions and 8 deletions

View File

@ -39,6 +39,7 @@
- Merged "Fixes zoomBy with floats (iOS)" [#1109](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1109) (thanks to [Manuito83](https://github.com/Manuito83))
- Merged "Build on and support Android 12 SDK 31" [#1111](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1111) (thanks to [carloserazo47](https://github.com/carloserazo47))
- Merged "Fix takeScreenshot Crash on iOS" [#1123](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1123) (thanks to [a00012025](https://github.com/a00012025))
- Merged "Feature. Possibility to disable iOS above keyboard inputAccessoryView" [#1124](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1124) (thanks to [cutzmf](https://github.com/cutzmf))
## 5.3.2

View File

@ -2955,11 +2955,8 @@ if(window.\(JAVASCRIPT_BRIDGE_NAME)[\(_callHandlerID)] != null) {
print("InAppWebView - dealloc")
}
// var accessoryView: UIView?
//
// // https://stackoverflow.com/a/58001395/4637638
// public override var inputAccessoryView: UIView? {
// // remove/replace the default accessory view
// return accessoryView
// }
// https://stackoverflow.com/a/58001395/4637638
public override var inputAccessoryView: UIView? {
return options?.disableInputAccessoryView ?? false ? nil : super.inputAccessoryView
}
}

View File

@ -69,6 +69,7 @@ public class InAppWebViewOptions: Options<InAppWebView> {
var applePayAPIEnabled = false
var allowingReadAccessTo: String? = nil
var disableLongPressContextMenuOnLinks = false
var disableInputAccessoryView = false
override init(){
super.init()

View File

@ -223,6 +223,10 @@ class IOSInAppWebViewOptions
///The default value is `false`.
bool disableLongPressContextMenuOnLinks;
///Set to `true` to disable the [inputAccessoryView](https://developer.apple.com/documentation/uikit/uiresponder/1621119-inputaccessoryview) above system keyboard.
///The default value is `false`.
bool disableInputAccessoryView;
IOSInAppWebViewOptions(
{this.disallowOverScroll = false,
this.enableViewportScale = false,
@ -255,7 +259,8 @@ class IOSInAppWebViewOptions
this.useOnNavigationResponse = false,
this.applePayAPIEnabled = false,
this.allowingReadAccessTo,
this.disableLongPressContextMenuOnLinks = false}) {
this.disableLongPressContextMenuOnLinks = false,
this.disableInputAccessoryView = false}) {
assert(
allowingReadAccessTo == null || allowingReadAccessTo!.isScheme("file"));
}
@ -303,6 +308,7 @@ class IOSInAppWebViewOptions
"applePayAPIEnabled": applePayAPIEnabled,
"allowingReadAccessTo": allowingReadAccessTo.toString(),
"disableLongPressContextMenuOnLinks": disableLongPressContextMenuOnLinks,
"disableInputAccessoryView": disableInputAccessoryView,
};
}
@ -365,6 +371,7 @@ class IOSInAppWebViewOptions
: null;
options.disableLongPressContextMenuOnLinks =
map["disableLongPressContextMenuOnLinks"];
options.disableInputAccessoryView = map["disableInputAccessoryView"];
return options;
}