List of usage examples for com.vaadin.client BrowserInfo isGecko
public boolean isGecko()
From source file:com.haulmont.cuba.web.toolkit.ui.client.passwordfield.CubaPasswordFieldWidget.java
License:Apache License
public void setAutocomplete(boolean autocomplete) { if (autocomplete) { getElement().removeAttribute("autocomplete"); } else {//from ww w .ja v a 2 s.co m BrowserInfo browser = BrowserInfo.get(); if (browser.isIE() || (browser.isGecko() && browser.getGeckoVersion() < 47) || (browser.isChrome() && browser.getBrowserMajorVersion() < 49)) { getElement().setAttribute("autocomplete", "off"); } else { getElement().setAttribute("autocomplete", "new-password"); } } }