Bladeren bron

Fixing autocompletion issue with ComboBox on newer Chrome versions (#11524)

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 #11437
tags/8.8.0.beta1
Tatu Lund 5 jaren geleden
bovenliggende
commit
7392bf241f
1 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen
  1. 6
    1
      compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java

+ 6
- 1
compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java Bestand weergeven

@@ -1420,7 +1420,12 @@ public class VFilterSelect extends Composite
* 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() + "");
}
}

/**

Laden…
Annuleren
Opslaan