Skip to content

Commit 8dc367c

Browse files
crisbetoandrewseguin
authored andcommitted
fix(form-field): users being able to select the hidden placeholder of disabled input (#13480)
Prevents the users from being able to select the hidden placeholder text by double-clicking on a disabled input. Fixes #13479.
1 parent 2fcf9e7 commit 8dc367c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/form-field/form-field-input.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
}
8686

8787
@include input-placeholder {
88+
// Prevent users from being able to select the placeholder text. Most of the time this can't
89+
// happen, however it's possible to do it when clicking on a disabled input (see #13479).
90+
@include user-select(none);
91+
8892
// Delay the transition until the label has animated about a third of the way through, in
8993
// order to prevent the placeholder from overlapping for a split second.
9094
transition: color $swift-ease-out-duration $swift-ease-out-duration / 3

0 commit comments

Comments
 (0)