GwtMaterialDesign / gwt-material

A Google Material Design wrapper for GWT
https://gwtmaterialdesign.github.io/gmd-core-demo/
Apache License 2.0
411 stars 124 forks source link

Scrolling/Viewport problem on Android when virtual keyboard ist opened #922

Open rwursthorn opened 5 years ago

rwursthorn commented 5 years ago

We built a registration-form with some textfields and some numberfields in it. Under the input-fields there a lot of text with the terms of condition and under that we use a switch to accept the terms of condition. So on smartphones you have to scroll down to get to the switch.

When you click in one of the textfields, put in some text, dont't close the virtual keyxboard and scroll down to the switch with the virtual keyboard still opened, then when you click the switch, the n the viewport jumps back near to the textfiled (the textfield is not in center of the viewport) and the value of the switch doesn't change.

When you do the same thing with one of the numberfields (put in some number, scroll down with opened virtual keyboard, click the switch), then the viewport stays at the switch and the value of the switch changes.

We use gwt-material 2.1 but I tested the behaviour on both demo-showcases (2.1.1 and 2.2) with a Samsung Galaxy S6 with Android 7.0 and both Samsung Internet 9.2.10.15 and Chrome 75.0.3770.101.

To test the behaviour I opened the example for textfields, put in some text in the first TextBox (First Name), left the virtual keyboard opened, scrolled down to one of the buttons (Validate or Set Value) and clicked the button. The Viewport jumps back near to the TextBox and the Action of the Button is not performed.

When I fill in one of the Number Value Boxes in the demo-showcase and scroll to a button with opened virtual keyboard, then the action of the button is performed and the viewport stays at the button when I click on it.

rwursthorn commented 4 years ago

This problem still occurs in demo-showcase 2.3 I found out, that it only occurs if you type in some new characters and leave the virtual keyboard open. If you delete some characters from a prefilled textfield and leave the virtual keyboard open, then the viewboard stays where it's expected to stay and the action of the button is performed.

Tested on Samsung Galaxy S6 with Android 7.0 on both Samsung Internet 11.1.2.2 and Chrome 81.0.4044.96