nextui-org / nextui

🚀 Beautiful, fast and modern React UI library.
https://nextui.org
MIT License
21.8k stars 1.49k forks source link

[BUG] - Modal doesn't handle well when the keyboard appears on iOS #3937

Open bambatta opened 5 hours ago

bambatta commented 5 hours ago

NextUI Version

2.4.8

Describe the bug

Modal was taken with form in accuracy with documentation. However, after focusing on the input field, when the iOS keyboard appears, the Modal is inexplicably positioned with extra indents. If you hide the keyboard and open it again, the bug always looks different. If the modal has no forms, correspondingly the keyboard does not appear then it works fine.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

1.Create a web page with a modal dialog (in my сase used placement: bottom prop). 2.Within the modal, add at least one input field. 3.Open a web page on your iOS device using Safari or Chrome. 4.Tap the input field in the modal to open the iOS keyboard. 5.Try opening and closing the keyboard a few times.

Expected behavior

When the keyboard appears, the modal should take the exact position without unnecessary animations and jerks regardless of the position. And if the prop bottom is displayed when the keyboard appears, the modal should be pressed against it with its lower part.

Screenshots or Videos

No response

Operating System Version

iOS 17.7

Browser

Chrome

linear[bot] commented 5 hours ago

ENG-1490 [BUG] - Modal doesn't handle well when the keyboard appears on iOS