浏览代码

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
tags/8.8.0.beta1
Tatu Lund 5 年前
父节点
当前提交
d213a42443
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      client/src/main/java/com/vaadin/client/ui/VComboBox.java

+ 6
- 1
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() + "");
}
}

/**

正在加载...
取消
保存