kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
84 stars 22 forks source link

[BUG] inputfield in a modal shifts position when scrolling (iOS) #2652

Open alxzak opened 1 year ago

alxzak commented 1 year ago

Describe the bug

The input field shifts position when you scroll inside a modal on iOS.

Describe how to reproduce the bug

  1. Open an app with Kirby on an iOS device
  2. Go to a screen with a modal that includes an input field
  3. Tap an input field to activate it (i.e. it has the cursor shown inside)
  4. Scroll up or down and see the active input "jumps"/shifts position while scrolling (as in the video below 👇🏻 )

Which Kirby version was used?

8.8.0

What was the expected behavior?

Active input field shouldn't scroll.

Add any screenshots

https://user-images.githubusercontent.com/78357155/205633074-bdad0649-0877-4a9f-8467-6ea2577d3634.MP4

Please complete the following information:

Are there any additional context?

Contact: Nikolaj Skousen / Jonas Skov


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review:

mictro commented 1 year ago

Reported behaviour was not reproducable in the kirby flows app but has been verified in ralationsbank 1.1.1 with kirby 7.4.0.

Perhaps not relevant, but In relationsbank 1.1.1 it was observed that removing the affix-container class on the input field made the problem disappear.

RasmusKjeldgaard commented 1 year ago

Reported behaviour was not reproducable in the kirby flows app but has been verified in ralationsbank 1.1.1 with kirby 7.4.0.

Perhaps not relevant, but In relationsbank 1.1.1 it was observed that removing the affix-container class on the input field made the problem disappear.

I was able to reproduce this in our flows app, and it turns out it is not related to modals only. It seems to happen when the keyboard pushes the form field up on the page - so , it starts lagging and the form-field position shifts.

This branch has the necessary flows update, and it can be reproduced on either a physical or emulated device when running npm run start:flows:android and scrolling just a little bit down on the page before clicking the form-field.

shifting-input-on-keyboard.webm