]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fix issue where Chrome refused to select text in Table (#11709)
authorsamulivaadin <samuli@vaadin.com>
Thu, 7 Nov 2019 11:42:28 +0000 (13:42 +0200)
committerAnna Koskinen <Ansku@users.noreply.github.com>
Thu, 7 Nov 2019 11:42:28 +0000 (13:42 +0200)
client/src/main/java/com/vaadin/client/ui/VScrollTable.java

index 26155c5bd6afe4a6b2ed90bb4f8b4688ea8e9857..1158dd1f808331b8284a6d077fa356fd97bd0538 100644 (file)
@@ -6345,15 +6345,15 @@ public class VScrollTable extends FlowPanel
 
                         if (targetCellOrRowFound) {
                             setRowFocus(this);
-                            ensureFocus();
+
                             if (dragmode != 0 && (event
                                     .getButton() == NativeEvent.BUTTON_LEFT)) {
+                                ensureFocus();
                                 startRowDrag(event, type, targetTdOrTr);
-
                             } else if (event.getCtrlKey() || event.getShiftKey()
                                     || event.getMetaKey()
                                             && isMultiSelectModeDefault()) {
-
+                                ensureFocus();
                                 // Prevent default text selection in Firefox
                                 event.preventDefault();