Commit 9b85ae9c authored by Lorenzo Pichilli's avatar Lorenzo Pichilli

updated dropDownWorkaround

parent ee4d0162
This diff is collapsed.
...@@ -854,8 +854,11 @@ final public class InAppWebView extends InputAwareWebView { ...@@ -854,8 +854,11 @@ final public class InAppWebView extends InputAwareWebView {
" var spanElement = document.createElement(\"span\");" + " var spanElement = document.createElement(\"span\");" +
" spanElement.flutterInAppWebViewSelect = selectElement;" + " spanElement.flutterInAppWebViewSelect = selectElement;" +
" new ResizeSensor(spanElement, function() {" + " new ResizeSensor(spanElement, function() {" +
" selectElement.style.width = spanElement.getBoundingClientRect().width + \"px\";" + " var style = selectElement.currentStyle || window.getComputedStyle(selectElement);" +
" selectElement.style.height = spanElement.getBoundingClientRect().height + \"px\";" + " var xMargin = parseFloat(style.marginLeft) + parseFloat(style.marginRight);" +
" var yMargin = parseFloat(style.marginTop) + parseFloat(style.marginBottom);" +
" selectElement.style.width = (spanElement.getBoundingClientRect().width - xMargin) + \"px\";" +
" selectElement.style.height = (spanElement.getBoundingClientRect().height - yMargin) + \"px\";" +
" });" + " });" +
" spanElement.className = \"flutterInAppWebViewSelect-\" + uuid;" + " spanElement.className = \"flutterInAppWebViewSelect-\" + uuid;" +
" spanElement.style.padding = \"0px\";" + " spanElement.style.padding = \"0px\";" +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment