daisyui icon indicating copy to clipboard operation
daisyui copied to clipboard

bug: The component dock pushes up when the keyboard is invoked on mobile

Open laraveladmin-cn opened this issue 5 months ago • 8 comments

Reproduction URL (Required)

https://demo.laraveladmin.cn/web/

What version of daisyUI are you using?

5.1.12

Which browsers are you seeing the problem on?

Other

Describe your issue

When opening the input box to enter content in Mi Browser, WeChat, or QQ on an Android phone::

Image Image

laraveladmin-cn avatar Sep 28 '25 07:09 laraveladmin-cn

Thank you @laraveladmin-cn for reporting issues. It helps daisyUI a lot 💚
I'll be working on issues one by one. I will help with this one as soon as a I find a solution.
In the meantime providing more details and reproduction links would be helpful.

github-actions[bot] avatar Sep 28 '25 07:09 github-actions[bot]

Try to add this to your page:

<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=overlays-content">

pdanpdan avatar Sep 28 '25 12:09 pdanpdan

[

Try to add this to your page:

<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=overlays-content">

](https://github.com/saadeghi/daisyui/issues/4138#issuecomment-3343131919)

I've tried the verification, but it still doesn't work! It still gets pushed to the top as usual. 验证试过了,还是不行!一样要被顶上去

laraveladmin-cn avatar Sep 29 '25 05:09 laraveladmin-cn

Then try again with: <meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-visual">

The problem is that they use probably old Chromium versions, that have not moved yet to the new behavior regarding viewport resizing when keyboard is shown.

https://github.com/vercel/next.js/discussions/63724

pdanpdan avatar Sep 29 '25 06:09 pdanpdan

It still doesn't work. I'll leave it for now. Google Chrome doesn't have this bug.

laraveladmin-cn avatar Sep 29 '25 09:09 laraveladmin-cn

I think this can be closed. It's a browser that does not over viewport config and uses the old viewport resizing method.

There are workarounds, but they are very complex and involve js and making the body fixed when am input is focused.

pdanpdan avatar Nov 05 '25 10:11 pdanpdan

Yeah it's a browser behavior.
I was thinking if we can hide the dock if screen height is too small (because keyboard is open)

saadeghi avatar Nov 05 '25 14:11 saadeghi

You can detect if the keyboard is open in modern chrome, but that uses the modern viewport

pdanpdan avatar Nov 05 '25 14:11 pdanpdan