-
Notifications
You must be signed in to change notification settings - Fork 7
fix(datepicker): fix datepicker issues when clearing value and notch border #1894
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second issue with the top border on clear for a non-readonly state still occurs.
I think the responsible style is again in input.material.scss, line 511, where the top border color of the notch is set to transparent in case the input is filled. Removing the filled selector might address it:
input:placeholder-shown + [part='notch'],
[part~='filled'] + [part='notch'] {
border: {
width: $active-border-width;
color: var-get($theme, 'focused-border-color');
top: $idle-border-width solid transparent;
}
}
if (this.nonEditable || !this._isDropDown) { | ||
this._input.blur(); | ||
Promise.resolve().then(() => this._input.focus()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to fix the positioning issue on clear through the icon, however, I am not convinced it would be the best solution.
In input.material.scss lines 145-159, there are the following styles, which set the proper positioning when the input is not readonly
. Having in mind that the issue occurs for readonly
, I believe removing the :not([readonly]) selector might address it?
:host(:not([readonly]):focus-within) {
[part='label'] {
@include type-style('caption');
translate: 0 -73%;
}
}
:host([outlined]:not([readonly]):focus-within) {
[part='label'] {
@extend %label;
align-self: start;
}
}
Closes #1886