From 1eaf70a04604145f3060736da8627ea13878117f Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Mon, 18 Apr 2022 01:26:39 +0200 Subject: [PATCH] merge --- CHANGELOG.md | 1 + ios/Classes/InAppWebView/FlutterWebViewController.swift | 1 - ios/Classes/InAppWebView/InAppWebView.swift | 4 +--- lib/src/in_app_webview/ios/in_app_webview_options.dart | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 48976ee7..47d90d74 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/ios/Classes/InAppWebView/FlutterWebViewController.swift b/ios/Classes/InAppWebView/FlutterWebViewController.swift index 2e338d90..8f883d2b 100755 --- a/ios/Classes/InAppWebView/FlutterWebViewController.swift +++ b/ios/Classes/InAppWebView/FlutterWebViewController.swift @@ -58,7 +58,6 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView { contextMenu: contextMenu, channel: channel!, userScripts: userScripts) - webView?.disableInputAccessoryView = options.disableInputAccessoryView } methodCallDelegate = InAppWebViewMethodHandler(webView: webView!) diff --git a/ios/Classes/InAppWebView/InAppWebView.swift b/ios/Classes/InAppWebView/InAppWebView.swift index b5256aa7..225c3973 100755 --- a/ios/Classes/InAppWebView/InAppWebView.swift +++ b/ios/Classes/InAppWebView/InAppWebView.swift @@ -2955,10 +2955,8 @@ if(window.\(JAVASCRIPT_BRIDGE_NAME)[\(_callHandlerID)] != null) { print("InAppWebView - dealloc") } -// var accessoryView: UIView? - var disableInputAccessoryView = false // https://stackoverflow.com/a/58001395/4637638 public override var inputAccessoryView: UIView? { - return disableInputAccessoryView ? nil : super.inputAccessoryView + return options?.disableInputAccessoryView ?? false ? nil : super.inputAccessoryView } } diff --git a/lib/src/in_app_webview/ios/in_app_webview_options.dart b/lib/src/in_app_webview/ios/in_app_webview_options.dart index 83d71ef4..a0c21e92 100755 --- a/lib/src/in_app_webview/ios/in_app_webview_options.dart +++ b/lib/src/in_app_webview/ios/in_app_webview_options.dart @@ -223,8 +223,8 @@ class IOSInAppWebViewOptions ///The default value is `false`. bool disableLongPressContextMenuOnLinks; - ///Set to `true` to disable inputAccessoryView above system keyboard - ///https://developer.apple.com/documentation/uikit/uiresponder/1621119-inputaccessoryview + ///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(