From ee4d016253964fc9539b279b59382681887c6cef Mon Sep 17 00:00:00 2001 From: Lorenzo Pichilli Date: Wed, 11 Dec 2019 21:25:49 +0100 Subject: [PATCH] updated dropDownWorkaround --- .idea/workspace.xml | 69 ++++++++++--------- .../InAppWebView/InAppWebView.java | 7 +- 2 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7f9bef3a..529dac31 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -15,11 +15,7 @@ - - - - @@ -43,10 +39,9 @@ - - + + - @@ -68,8 +63,8 @@ - - + + @@ -113,8 +108,12 @@ - - + + + + + + @@ -140,7 +139,6 @@ - _channel default _staticChannel defa @@ -170,6 +168,7 @@ ThreadedInputConnecti InputAwareWebView \n + dropDownWorkaroundEnabled activity.getPreferences(0) @@ -238,10 +237,10 @@ @@ -470,6 +469,7 @@ + @@ -840,16 +840,6 @@ - - - - - - - - - - @@ -870,13 +860,6 @@ - - - - - - - @@ -891,12 +874,32 @@ + + + + + + + + + + + + + + + + + + + + + - - + + - diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebView/InAppWebView.java b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebView/InAppWebView.java index 5d5def47..66321029 100644 --- a/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebView/InAppWebView.java +++ b/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebView/InAppWebView.java @@ -877,6 +877,10 @@ final public class InAppWebView extends InputAwareWebView { " var clickEventListener = function(event) {" + " var self = this;" + " event.preventDefault();" + + " var isDisabled = !!this.flutterInAppWebViewSelect.disabled;" + + " if (isDisabled) {" + + " return;" + + " }" + " this.flutterInAppWebViewSelect.focus();" + " var options = [];" + " var optionElements = this.flutterInAppWebViewSelect.querySelectorAll(" + @@ -890,8 +894,7 @@ final public class InAppWebView extends InputAwareWebView { " });" + " }" + " var isMultiple = !!this.flutterInAppWebViewSelect.multiple;" + - " window.flutter_inappwebview" + - " .callHandler(" + + " window." + JavaScriptBridgeInterface.name + ".callHandler(" + " \"flutterInAppWebViewDropDownWorkaround\"," + " getIndexSelectValues(this.flutterInAppWebViewSelect)," + " isMultiple," +