diff options
author | Leif Åstrand <leif@vaadin.com> | 2016-02-14 14:33:17 +0200 |
---|---|---|
committer | Teemu Suo-Anttila <teemusa@vaadin.com> | 2016-03-08 13:59:02 +0200 |
commit | 0e8ce22d2b2fde5576c9b8e42135a297c6992d79 (patch) | |
tree | cdecebc3ce4f96df3a845162aed82b3249cc9d7f | |
parent | 2825a7d1a2a9e3c39b3865f99b2b8e364586cd66 (diff) | |
download | vaadin-framework-0e8ce22d2b2fde5576c9b8e42135a297c6992d79.tar.gz vaadin-framework-0e8ce22d2b2fde5576c9b8e42135a297c6992d79.zip |
Disable browser's own autocomplete suggestions in ComboBox (#16647)
Change-Id: Icad835600685ac7ed9f7dbb09af134839154e696
-rw-r--r-- | client/src/com/vaadin/client/ui/VFilterSelect.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VFilterSelect.java b/client/src/com/vaadin/client/ui/VFilterSelect.java index 9459cc14a6..1d3e4768d5 100644 --- a/client/src/com/vaadin/client/ui/VFilterSelect.java +++ b/client/src/com/vaadin/client/ui/VFilterSelect.java @@ -1132,6 +1132,26 @@ public class VFilterSelect extends Composite implements Field, KeyDownHandler, public class FilterSelectTextBox extends TextBox { /** + * Creates a new filter select text box. + * + * @since + */ + public FilterSelectTextBox() { + /*- + * Stop the browser from showing its own suggestion popup. + * + * Using an invalid value instead of "off" as suggested by + * https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion + * + * Leaving the non-standard Safari options autocapitalize and + * autocorrect untouched since those do not interfere in the same + * way, and they might be useful in a combo box where new items are + * allowed. + */ + getElement().setAttribute("autocomplete", "nope"); + } + + /** * Overridden to avoid selecting text when text input is disabled */ @Override |