daisyui icon indicating copy to clipboard operation
daisyui copied to clipboard

bug: drawer-end makes horizontal scrollbar permanently visible.

Open kobe-ra opened this issue 1 year ago โ€ข 8 comments

What version of daisyUI are you using?

v4.4.19

Which browsers are you seeing the problem on?

Chrome

Reproduction URL

https://daisyui.com/components/drawer/#drawer-that-opens-from-right-side-of-page

Describe your issue

Horizontal scrollbar is permanently visible when using drawer drawer-end. This issue is also visible in the docs.

image

kobe-ra avatar Dec 06 '23 15:12 kobe-ra

Thank you @kobe-ra 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 Dec 06 '23 15:12 github-actions[bot]

image the horizontal scrollbar is visible in the Official doc example

ariaieboy avatar Dec 09 '23 15:12 ariaieboy

I'm observing the same behavior in Edge. Firefox renders correctly. I'm using Next.js 14, tailwindcss 3.3.6, daisyui 4.4.19

I'm using drawer drawer-end in a root layout and that's when this happens. If I change drawer drawer-end to a template or page, the scroll disappears, but the drawer slides from the left, instead of right.

Also, I'm observing some styles not rendering correctly in Edge (oversized components) but correct in Firefox. This was working fine last week, so this bug must have been introduced in the most recent versions.

Edit: This bug was apparently introduced in 4.4.15, as 4.4.14 doesn't show this behavior. As for my oversized components in Edge, I will keep looking, since downgrading all the way through 4.4.0 didn't fix it, so this is an unrelated issue.

l1c2d3 avatar Dec 09 '23 21:12 l1c2d3

hi! solved the issue by adding overflow-x-hidden tailwind class to <div class="drawer-side"

gagansuie avatar Dec 09 '23 23:12 gagansuie

hi! solved the issue by adding overflow-x-hidden tailwind class to <div class="drawer-side"

In my project, by adding overflow-x-hidden can be solved on the desktop, but on the mobile phone, the entire screen can be swiped left or right through the touch screen.

After returning to 4.4.14, this problem was solved.

LanceMoe avatar Dec 10 '23 05:12 LanceMoe

If that's the case, you can do md:overflow-x-hidden or something to do this fix on certain screen sizes.

gagansuie avatar Dec 10 '23 06:12 gagansuie

Using version 4.4.19, this error is still occurring. It's not noticeable on macOS Chrome, but on Windows, an unscrollable scrollbar appears.

Update: Cheated problem until it officially fixed. I used tailwind peer class for select siblings, so when input unchecked it disables overflow-y and when input checked it enables overflow-y back again.

<input id="id_wallet_charge_drawer" type="checkbox" className="peer/gcdrawer drawer-toggle" />
<div className="drawer-side z-40 overflow-y-clip peer-checked/gcdrawer:overflow-y-auto">

gereltod-g avatar Dec 22 '23 07:12 gereltod-g

md:overflow-x-hidden

+1

bayasdev avatar Jan 14 '24 18:01 bayasdev