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

Resolve race condition between opening modal and accessing offsetWidth/offsetHeight #8

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Resolve race condition between opening modal and accessing offsetWidth/offsetHeight #8

merged 1 commit into from
Oct 18, 2023

Conversation

Tugzrida
Copy link
Contributor

When rendering the signature pad inside a modal, offsetWidth and offsetHeight will return 0 until the modal is open, meaning the canvas height and width are set to 0, rendering it unusable.

Setting the alpine hook to visible will wait until the modal is open before initialising the component.

fixes #7

@saade saade merged commit 1aa827a into saade:3.x Oct 18, 2023
1 check passed
@saade
Copy link
Owner

saade commented Oct 18, 2023

thanks

@Tugzrida Tugzrida deleted the Tugzrida-patch-1 branch October 18, 2023 13:17
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

Successfully merging this pull request may close these issues.

[Bug]: Does not work in a table modal action
2 participants