diff options
author | Tatu Lund <tatu@vaadin.com> | 2019-04-10 13:07:43 +0300 |
---|---|---|
committer | Sun Zhe <31067185+ZheSun88@users.noreply.github.com> | 2019-04-10 13:07:42 +0300 |
commit | d213a4244341f52846505aa430677ae58954d04e (patch) | |
tree | 9780fee57943a654af8d979d2060ecdf7de9d2a8 /client | |
parent | 71c657243b574acde15de202ca914051de71c34e (diff) | |
download | vaadin-framework-d213a4244341f52846505aa430677ae58954d04e.tar.gz vaadin-framework-d213a4244341f52846505aa430677ae58954d04e.zip |
Fixing autocompletion issue with ComboBox on newer Chrome versions (#11472)
* Fixing autocompletion issue with ComboBox on newer Chrome versions
Newer Chrome versions do not work with random number hack to prevent auto completion, but it finally supports autocomplete=off.
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
* Merge branch 'master' into fix11437
Diffstat (limited to 'client')
-rw-r--r-- | client/src/main/java/com/vaadin/client/ui/VComboBox.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java index 95e4505d68..fbac85c2af 100644 --- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java +++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java @@ -1372,7 +1372,12 @@ public class VComboBox extends Composite implements Field, KeyDownHandler, * way, and they might be useful in a combo box where new items are * allowed. */ - getElement().setAttribute("autocomplete", Math.random() + ""); + if (BrowserInfo.get().isChrome()) { + // Chrome supports "off" and random number does not work with Chrome + getElement().setAttribute("autocomplete", "off"); + } else { + getElement().setAttribute("autocomplete", Math.random() + ""); + } } /** |