Skip to content

Commit

Permalink
fix(form-field): users being able to select the hidden placeholder of…
Browse files Browse the repository at this point in the history
… disabled input (#13480)

Prevents the users from being able to select the hidden placeholder text by double-clicking on a disabled input.

Fixes #13479.
  • Loading branch information
crisbeto authored and andrewseguin committed Nov 14, 2018
1 parent 2fcf9e7 commit 8dc367c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib/form-field/form-field-input.scss
Expand Up @@ -85,6 +85,10 @@
}

@include input-placeholder {
// Prevent users from being able to select the placeholder text. Most of the time this can't
// happen, however it's possible to do it when clicking on a disabled input (see #13479).
@include user-select(none);

// Delay the transition until the label has animated about a third of the way through, in
// order to prevent the placeholder from overlapping for a split second.
transition: color $swift-ease-out-duration $swift-ease-out-duration / 3
Expand Down

0 comments on commit 8dc367c

Please sign in to comment.