diff options
author | Zhe Sun <31067185+ZheSun88@users.noreply.github.com> | 2020-05-26 12:59:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-26 12:59:06 +0300 |
commit | d1b3a396d890f5b6124cbc90adff9a24b76b8b1a (patch) | |
tree | f7ae804dd523c1d2a25bd7577cd60034f16b8ee7 /compatibility-client | |
parent | bae3d61dd1f8524a115531d77465a56ca74b48a9 (diff) | |
download | vaadin-framework-8.11.0.tar.gz vaadin-framework-8.11.0.zip |
Use Rebase and Merge, Please (#12023)8.11.0
Diffstat (limited to 'compatibility-client')
3 files changed, 14 insertions, 19 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java index 86fa8ed500..d7ae6f3c07 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java @@ -1409,23 +1409,8 @@ public class VFilterSelect extends Composite * @since 7.6.4 */ public FilterSelectTextBox() { - /*- - * Stop the browser from showing its own suggestion popup. - * - * Using an invalid value instead of "off" as suggested by - * https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion - * - * Leaving the non-standard Safari options autocapitalize and - * autocorrect untouched since those do not interfere in the same - * way, and they might be useful in a combo box where new items are - * allowed. - */ - 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() + ""); - } + // Stop the browser from showing its own suggestion popup. + WidgetUtil.disableBrowserAutocomplete(this); } /** diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java index 4b0a52c1bd..c4294009d2 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java @@ -349,6 +349,8 @@ public class VScrollTable extends FlowPanel private SelectMode selectMode = SelectMode.NONE; + private boolean multiSelectTouchDetectionEnabled = true; + public final HashSet<String> selectedRowKeys = new HashSet<String>(); /* @@ -1502,6 +1504,10 @@ public class VScrollTable extends FlowPanel } else { selectMode = SelectMode.NONE; } + if (uidl.hasAttribute("touchdetection")) { + multiSelectTouchDetectionEnabled = uidl + .getBooleanAttribute("touchdetection"); + } } } @@ -1951,9 +1957,10 @@ public class VScrollTable extends FlowPanel } private void setMultiSelectMode(int multiselectmode) { - if (BrowserInfo.get().isTouchDevice()) { + if (BrowserInfo.get().isTouchDevice() + && multiSelectTouchDetectionEnabled) { // Always use the simple mode for touch devices that do not have - // shift/ctrl keys + // shift/ctrl keys (unless this feature is explicitly disabled) this.multiselectmode = MULTISELECT_MODE_SIMPLE; } else { this.multiselectmode = multiselectmode; diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTextualDate.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTextualDate.java index 4d52e3e4f8..e332e628fd 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTextualDate.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTextualDate.java @@ -35,6 +35,7 @@ import com.vaadin.client.BrowserInfo; import com.vaadin.client.Focusable; import com.vaadin.client.LocaleNotLoadedException; import com.vaadin.client.LocaleService; +import com.vaadin.client.WidgetUtil; import com.vaadin.client.ui.SubPartAware; import com.vaadin.client.ui.aria.AriaHelper; import com.vaadin.client.ui.aria.HandlesAriaCaption; @@ -115,6 +116,8 @@ public class VTextualDate extends VDateField if (BrowserInfo.get().isIE()) { addDomHandler(this, KeyDownEvent.getType()); } + // Stop the browser from showing its own suggestion popup. + WidgetUtil.disableBrowserAutocomplete(text); add(text); } |