Skip to content

Commit 9255c9e

Browse files
fix(textfield): Disable default touch actions for JS Component labels (google#4946)
Fixes issue where the label positioned on top of the text field intercepts the click event the textfield needs to gain focused. This was originally uncaught because textfield labels were always given a `for` attribute pointing back to a uniquely ID'd textfield. We cannot, however, assume this will always be the case. [ci skip]
1 parent ac3fb23 commit 9255c9e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/mdl-textfield/mdl-textfield.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ $mdl-textfield-disabled-border-on-dark: rgba(white, .3);
143143
}
144144
}
145145
}
146+
147+
.mdl-textfield__label {
148+
pointer-events: none;
149+
}
146150
}
147151

148152
.mdl-textfield--focused {

0 commit comments

Comments
 (0)