-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Select: Blur is fired before change resulting in invalid form #6906
Comments
I think this is not related to Form component. Could you please try it without Form? Does it have the same behaviour? |
It has the same behaviour without the Form component yes. It just gets visible with. It's also an issue with multiselects when clicking on the checkbox; blur ir fired when clicking on it. |
I'm having the same issue.. Related issue >> |
@mertsincan This issue is basically a breaker for us in terms of using your forms. We're currently unable to hack a situation where our form dropdowns work properly. The resolver is validating on stale value, instead of triggering after.. I think it has to do with the layered blur events Appreciate your work 🙏 |
Opened PR: #7170 Tested locally, this solved my issue. |
Describe the bug
I have a form with a select wrapped in a form field, and I want the form to be validated on blur. The blur event on the select is fired before the update event when selecting an option, and with validateOnValueUpdate=true on the form field, this results in ab invalid input a few milliseconds before the change event fires
Reproducer
https://stackblitz.com/edit/vitejs-vite-czkzcy?file=src%2FApp.vue
PrimeVue version
4.2.1
Vue version
3.x
Language
ES5
Build / Runtime
Vite
Browser(s)
Chrome 131
Steps to reproduce the behavior
Expected behavior
Blur event should not fire when clicking on an option
The text was updated successfully, but these errors were encountered: