2

I use Vaadin7 and I develop my application and test it with Edge. When I enter information in my input fields, I remark than Edge store data like this (see screenshot). My question is can we block with Vaadin the message in my input fields ? I don't want change parameter in my browser Edge but I would like to do it in my code.

Best regard.

Thank you

Screenshot

marius75
  • 21
  • 2
  • I agree with Eisenknurr's answer. I tried to use invalid data, and it seems the only way which can work in Edge. You can use `autocomplete="pineapple"` or some other gibberish to disable the autocompletion. – Yu Zhou Sep 17 '21 at 02:58

1 Answers1

2

It's a tad complicated.

First of all, there is no standard way of doing this. There is the non-standard attribute autocomplete that, when set to off, seems to work (or at least have worked at some point in time, see Disable browser 'Save Password' functionality) but only in non-edge browsers. One trick seems to be to use some kind of hiding/obfuscation (which I would consider a bad idea and probably leads to accessibility issues) like mentioned here: https://stackoverflow.com/a/2555771/10493440. A current approach is using invalid data: https://stackoverflow.com/a/52608082/10493440

I would not suggest any of that as it might break at any time without warning. Changing your browser's setting is the proper way to go even if that might feel unsatisfactory.

For the Vaadin part: Give your field an ID and then apply any of the suggestion above via JavaScript.execute(...) method.

Eisenknurr
  • 374
  • 1
  • 13