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

Add type="button" to prevent submits when used inside a form #75

Merged
merged 1 commit into from
Mar 16, 2019

Conversation

astronomersiva
Copy link
Contributor

Thanks for this amazing library!

I upgraded from 0.3.2 and noticed that when pickr is used inside forms, the form is submitted on opening the color picker. This is because, the buttons do not have a type="button" attribute and hence defaults to a value of submit which ends up submitting the form.

I have added type="button" in all buttons in the code.

@simonwep
Copy link
Owner

simonwep commented Mar 16, 2019

Wow, never thought a button could have (or it would make sense) a type="button" prop 😅
Thanks!

@simonwep
Copy link
Owner

Please note that the package was moved from pickr-widget to @simonwep/pickr!

@astronomersiva
Copy link
Contributor Author

@simonwep, can you please release this and other merged commits after 0.4.3 as a new version?

I am currently pointing to the GitHub link instead of a version in package.json and it will make things simpler especially inside corporate networks that usually restrict outbound network calls.

@simonwep
Copy link
Owner

@astronomersiva Exactly what I wanted :) Give me 5min.

@astronomersiva
Copy link
Contributor Author

Thanks a ton @simonwep 👍 I can see 0.4.4 in the registry now

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.

2 participants