praveenjuge / kutty

Kutty is a tailwind plugin for building web applications. It has a set of accessible and reusable components that are commonly used in web applications.

Home Page:https://kutty.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open dialog creates scroll bar

Destaq opened this issue · comments

For a page that does not have a scroll bar, everything gets shifted slightly to the left when the dialog opens, as a scrollbar is created.

Before
image

After
image
Note the white bar on the far right.

Is there any way to prevent this behavior?

Additionally, the dialog does not close when clicking on any of the buttons, just by clicking outside of it. I have AlpineJS as a src script, on the @click="close" event listeners, but the documentation did not show how to implement the close method.

I'll fix the scroll bar bug 👍

Can you share a minimal reproduction repo for the close event not working?

@praveenjuge Done.
https://github.com/Destaq/broken-kutty-dialog

  1. npm i
  2. npm run build:css
  3. npm run serve = you can click outside the dialog to close it, but not on the buttons...

This also seems to be the case for another dynamic component, the drawer @praveenjuge . If you look at the drawer branch on the repo, you can see that it does not work as well. No popup shows, the page only dims.

Thanks, I'll take a look

Thanks, I'll take a look

Thank you, I hope it can be resolved.

I tried cloning this repo: #5 that did not use AlpineJS, and the dialog worked perfectly. However, since then the dialog has been changed and no longer works - this may be useful information to you.

@praveenjuge
I've done some digging and solved the problem, there was a name clash.

Fixed in this PR: #31

Although the dialog creating scrollbar to the right still happens.

Hey, I have fixed the issue in the latest commit.

You can check if it's working here: https://codepen.io/praveenjuge/pen/KKNdavv

I'll tag a release soon. Thanks for raising this issue!

Works great, thanks for fixing and making Kutty!

Fixed in release 0.5.0