LastMonopoly / scaled_app

Scale the entire UI design proportionally, useful when your UI design is fixed-width.
https://pub.dev/packages/scaled_app
BSD 3-Clause "New" or "Revised" License
14 stars 8 forks source link

Flutter Web UI jumps to the top left in Chromium Browser on input focus #18

Closed flodaniel closed 2 weeks ago

flodaniel commented 2 weeks ago

When we use ScaledWidgetsFlutterBinding.ensureInitialized and the user focuses a text input field the entire app jumps to the left. We only observe this behavior in chromium browsers and not in safari.

image

Wrapping all our routes in the scaled MediaQuery also does not help:

            return MediaQuery(
              data: MediaQuery.of(context).scale(),
              child: child!,
            );

Edit: Just discovered that the jump increases in relation to the scale factor. This is the jumping when we return 0.58 in the scaleFactor method:

image

flodaniel commented 2 weeks ago

Just found the same issue here: https://github.com/LastMonopoly/scaled_app/issues/6