Disable Browser Autofill On Telerik Blazor Autocomplete

1 Answer 378 Views
AutoComplete
billy
Top achievements
Rank 2
Iron
Iron
Iron
billy asked on 23 Oct 2023, 05:02 PM

I need to disable the browser's autofill option on our Blazor Autocomplete. How can I accomplish this?

THanks

Billy

1 Answer, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 26 Oct 2023, 11:40 AM

Hi, Billy,

If we are talking about automatic browser autofill on page load, I can suggest two possible ways to prevent it:

  • Clear the value with JavaScript, for example from OnAfterRenderAsync. Use a small timeout to execute the code after the browser auto-fills. You can set the autocomplete attribute with JavaScript as well.
  • Render the AutoComplete disabled, so the browser skips it. Then, enable it after a short delay.

Additionally, you can find more information on Autofill in the following articles. The overall situation is that browsers may not always obey the rendered autocomplete attribute and developers come up with ideas how to workaround this.

Best regards,
Georgi
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages! Or perhaps, if you are new to our Telerik family, check out our getting started resources!
Tags
AutoComplete
Asked by
billy
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Georgi
Telerik team
Share this question
or