Skip to content

Commit f25e89a

Browse files
committed
fix(select): arrow highlighted state not updating in Safari
Fixes the color of the select arrow not updating correctly when focusing and blurring in Safari. It seems like Safari wasn't recalculating the styles, for some reason.
1 parent eef132b commit f25e89a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/material/select/select.scss

+7
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ $mat-select-placeholder-arrow-space: 2 * ($mat-select-arrow-size + $mat-select-a
7272
._mat-animation-noopable.mat-form-field-appearance-standard .mat-select.mat-select-empty & {
7373
transition: none;
7474
}
75+
76+
// On Safari the arrow won't necessarily get redrawn when the form field is focused or blurred,
77+
// which means that its highlighted styling will be stuck in an incorrect state. We can get
78+
// Safari to redraw it by adding a transform.
79+
.mat-form-field.mat-focused & {
80+
transform: translateX(0);
81+
}
7582
}
7683

7784
.mat-select-arrow {

0 commit comments

Comments
 (0)