Newer Chrome versions do not work with random number hack to prevent auto completion, but it finally supports autocomplete=off. Adapted from https://github.com/vaadin/framework/pull/11472 Fixes #11437tags/8.8.0.beta1
* way, and they might be useful in a combo box where new items are | * way, and they might be useful in a combo box where new items are | ||||
* allowed. | * 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() + ""); | |||||
} | |||||
} | } | ||||
/** | /** |