-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
mat-select with validation not kicked when focus is lost #8573
Comments
That is what is happening. When you open the Try using tab, esc, and the arrow keys to navigate the two inputs. It may help illuminate what the current behavior is. |
@willshowell this is not what I would expect. I would expect the If we take the situation as you say, it means that in autocomplete there is a bug, because the focus is lost when you deselect the value. Using keyboard keys as you mentioned is not showing the issue. Using keyboard this is behaving properly as expected. True that. |
I think maybe the better argument would be that https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_select_required And https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_input_autocomplete |
For me, the examples you've provided are not exactly showing the issue with For me it is just wierd, that one type of field is behaving very differently in this context. How behaves the If you insist that this is the correct behavior, I should be able to implement one of the events and set the |
Currently `mat-select` is only marked as touched when the trigger is blurred. This means that it still considered untouched if the user opens the panel and clicks away, which then requires another click to show any validation messages. These changes switch to considering the control as touched whenever the panel is closed. Fixes angular#8573.
Currently `mat-select` is only marked as touched when the trigger is blurred. This means that it still considered untouched if the user opens the panel and clicks away, which then requires another click to show any validation messages. These changes switch to considering the control as touched whenever the panel is closed. Fixes #8573.
Currently `mat-select` is only marked as touched when the trigger is blurred. This means that it still considered untouched if the user opens the panel and clicks away, which then requires another click to show any validation messages. These changes switch to considering the control as touched whenever the panel is closed. Fixes angular#8573.
Currently `mat-select` is only marked as touched when the trigger is blurred. This means that it still considered untouched if the user opens the panel and clicks away, which then requires another click to show any validation messages. These changes switch to considering the control as touched whenever the panel is closed. Fixes angular#8573.
Currently `mat-select` is only marked as touched when the trigger is blurred. This means that it still considered untouched if the user opens the panel and clicks away, which then requires another click to show any validation messages. These changes switch to considering the control as touched whenever the panel is closed. Fixes #8573.
Currently `mat-select` is only marked as touched when the trigger is blurred. This means that it still considered untouched if the user opens the panel and clicks away, which then requires another click to show any validation messages. These changes switch to considering the control as touched whenever the panel is closed. Fixes #8573.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
In my opinion bug with
mat-select
. The error message is not visible when dropdown is closed; focus is not behaving properly with "required" attribute applied.What is the expected behavior?
When focus is not on the control anymore, the error message should be visible.
What is the current behavior?
When focus is lost, the error message is not immediately visible.
What are the steps to reproduce?
What is the use-case or motivation for changing an existing behavior?
As on the plunker shown, autocomplete is behaving move intuitevly when deselecting / closing the dropdown. Validation occurs immediatelly as you would expect it. With mat-select it's not. In order to kick off the validation, you need to click twice somewhere on the form (some sort).
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
material: 5.0.0-rc.1-6a9fbfe
angular: as for version above
OS: win 10 64bit enterprise
browser: all
Is there anything else we should know?
nope, keep up the good work over this repository :)
The text was updated successfully, but these errors were encountered: