Skip to content

Commit edab4a0

Browse files
authored
Update knowledge-base/textbox-eye-reveal-password.md
1 parent 8fe6514 commit edab4a0

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

knowledge-base/textbox-eye-reveal-password.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,31 @@ This KB answers the following questions:
4343
4444
<TelerikTextBox @bind-Value="@TextBoxValue1" Password="@TextBoxPassword1" Width="200px">
4545
<TextBoxSuffixTemplate>
46-
<TelerikToggleButton Icon="@SvgIcon.Eye"
46+
<TelerikToggleButton Icon="@( TextBoxPassword1 ? SvgIcon.Eye : SvgIcon.EyeSlash )"
4747
OnClick="@( () => TextBoxPassword1 = !TextBoxPassword1 )"
4848
Selected="@( !TextBoxPassword1 )" />
4949
</TextBoxSuffixTemplate>
5050
</TelerikTextBox>
5151
52-
<p>Reveal password on HTML element mousedown</p>
52+
<p>Reveal password on HTML element @@onmousedown</p>
5353
5454
<TelerikTextBox @bind-Value="@TextBoxValue2" Password="@TextBoxPassword2" Width="200px">
5555
<TextBoxSuffixTemplate>
5656
<span @onmousedown="@( () => TextBoxPassword2 = false )"
5757
@onmouseup="@( () => TextBoxPassword2 = true )">
58-
<TelerikButton Icon="@SvgIcon.Eye" />
58+
<TelerikButton Icon="@SvgIcon.Eye" ButtonType="@ButtonType.Button" />
5959
</span>
6060
</TextBoxSuffixTemplate>
6161
</TelerikTextBox>
6262
63+
<style>
64+
/* Hide native browser eye icon in Edge if enabled */
65+
input.k-input-inner[type="password"]::-ms-reveal,
66+
input.k-input-innerinput[type="password"]::-ms-clear {
67+
display: none;
68+
}
69+
</style>
70+
6371
@code {
6472
private string TextBoxValue1 { get; set; } = "abcde1";
6573
private bool TextBoxPassword1 { get; set; } = true;

0 commit comments

Comments
 (0)