Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Hidden scrollbars can't be reverted #2276

Closed
TheStu opened this issue Aug 22, 2023 · 1 comment
Closed

bug: Hidden scrollbars can't be reverted #2276

TheStu opened this issue Aug 22, 2023 · 1 comment

Comments

@TheStu
Copy link

TheStu commented Aug 22, 2023

What version of daisyUI are you using?

3.5.1

Describe your issue

Scrollbars seem to be hidden by default for drawer content in Daisy. This would normally be easy enough to override, however there seems to be a browser bug(?) where, once scrollbars are hidden with CSS they are impossible to restore, except by re-creating them from scratch or deleting CSS rules via JS -- https://stackoverflow.com/questions/9060421/css3-how-to-restore-webkit-scrollbar-property-to-the-default-scroll-bar

I'm not sure this qualifies as a bug with Daisy exactly, but it would be ideal if hiding scrollbars was opt-in, rather than the default, given the difficulty in restoring them.

What browsers are you seeing the problem on?

Chrome

Reproduction URL

No response

@saadeghi
Copy link
Owner

Yes, as far as I know it's a bug in webkit, if we hide ::-webkit-scrollbar, it can't be overridden.

The reason the scroll bar is hidden is that daisyUI provides options to put the sidebar on left or right. and It also supports RTL mode. So there's a logical problem with that:

  • ✅ In LTR mode, if the sidebar is on start (left), the scrollbar of the page would be on right side of the page and the scrollbar of the sidebar would be on right side of the sidebar.
  • ❌ In LTR mode, if the sidebar is on end (right), the scrollbar of the page would be on right side of the page and the scrollbar of the sidebar would be on right side of the page as well. so it would create double scrollbars.
  • ✅ In RTL mode, if the sidebar is on start (right), the scrollbar of the page would be on left side of the page and the scrollbar of the sidebar would be on left side of the sidebar.
  • ❌ In RTL mode, if the sidebar is on end (left), the scrollbar of the page would be on left side of the page and the scrollbar of the sidebar would be on left side of the page as well. so it would create double scrollbars.

One solution would be inverting the direction of the sidebar in above problematic scenarios to invert the scrollbar direction but then we would end up with a RTL directed sidebar in a LTR page and a LTR directed sidebar in a RTL page. That's not good.

To avoid this double scrollbar problem, i decided to visually hide the scrollbar of the sidebar.
However if I find a better solution, I would use that of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants