Turn off text input in Edge?

I built an AngularJS dropdown text block that works fine in Chrome, Firefox, Safari, and Internet Explorer.

The feature of this component is that you enter a string, and then you can use the up / down arrow keys to scroll through the sentences.

In Microsoft Edge, as soon as you click the down arrow, the following text is added to the input field:

briefly explain your changes (corrected spelling, corrected grammar, improved formatting)

Is there anything I can do on the client side to prevent this from happening?

<form> <input type="text" /> </form> 

To demonstrate this, run the above scissor, enter something in the text box and double-click the down arrow on Edge. I want this to not happen, as it violates my autocomplete!

thanks

+12
html input microsoft-edge
source share
5 answers

If I understand correctly, you have a problem with the autocomplete function. Just add "autocomplete = 'off" to your input and this should disable the function.

 <input type="text" autocomplete="off"/> 
+25
source share

Unfortunately, none of the above suggestions helped me in the latest version of Edge. However, this solution:

 <input type="text" autocomplete="off" list="autocompleteOff" id="fieldId" name="fieldname" placeholder="Placeholder here" /> 

This causes Edge to find a data search list named autocompleteOff that does not exist. The treat works for me.

An added benefit is that it is pure HTML, without CSS or JS.

+6
source share

From Mozilla: You can set autocomplete by the actual form tag <form autocomplete='off' ... >...</form> , which will work throughout the form, or by individual <input type='text' /> tags <input type='text' /> .

In my experience with IE 11 and Edge that put it on a form, but individual tags don't work. I tried testing in Chrome, but the fields were no longer auto-complete.

Please read the full article for more details.

Note

Most browsers ignore this for login fields.

+5
source share

if you want to remove autocomplete at the input to chrome when using autocomplete="off" , you must also remove the id. If you do not delete the id on your input, autocomplete will not work!

simple example:

 <input type="text" autocomplete="off" list="autocompleteOff" name="fieldname" placeholder="Placeholder here" /> 

you can handle your input with a name;), this works fine for me.

+3
source share

if you need an app / website you can use jquery:

 $('input').attr('autocomplete','off'); 

Or, if you are like me and using Angular + ui-router , you can try the following:

In index.html add the following script:

 <script type="text/javascript"> setTimeout(function() { $('input').attr('autocomplete', 'off'); }, 2000); </script> 

Then, to capture state changes, add the following to your root controller:

 $rootScope.$on('$stateChangeStart', function() { $timeout(function () { $('input').attr('autocomplete', 'off'); }, 2000); }); 

Timeouts are for rendering html before using jquery.

If you find a better solution, let me know.

+1
source share

All Articles