We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6812b2 commit d5b2d81Copy full SHA for d5b2d81
lib/java/com/google/android/material/textfield/PasswordToggleEndIconDelegate.java
@@ -99,7 +99,9 @@ public void onClick(View v) {
99
editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
100
}
101
// And restore the cursor position
102
- editText.setSelection(selection);
+ if (selection >= 0) {
103
+ editText.setSelection(selection);
104
+ }
105
106
});
107
textInputLayout.addOnEditTextAttachedListener(onEditTextAttachedListener);
0 commit comments