aboutsummaryrefslogtreecommitdiffstats
path: root/client/src
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2019-10-30 12:26:32 +0200
committerGitHub <noreply@github.com>2019-10-30 12:26:32 +0200
commit7e44bb38e1c4b0166e78697da74f33517cd1e4f3 (patch)
treecace84510bab262247792c1858ea6376ff492b8f /client/src
parent643c29cfdb2c5c50b3b6ddd29ac90761d1e777c1 (diff)
downloadvaadin-framework-7e44bb38e1c4b0166e78697da74f33517cd1e4f3.tar.gz
vaadin-framework-7e44bb38e1c4b0166e78697da74f33517cd1e4f3.zip
Switch from an assert to logging and return in Grid.onBrowserEvent (#11778)
- If the Grid has frozen columns zooming can cause the regular column cells to be ever so slightly out of sync with their corresponding rows. This difference is not noticeable to naked eye but is big enough that it's possible to hover over the row instead of the cell, which causes an assertion error and a big ugly error popup. Switching to logging retains the information delivered by the assertion error for developer purposes but makes the end user experience smoother. - Can be tested manually with GridColumnFrozenColumn test UI. Fixes #11198
Diffstat (limited to 'client/src')
-rwxr-xr-xclient/src/main/java/com/vaadin/client/widgets/Grid.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java
index 2cbeb9cd21..977935c9bf 100755
--- a/client/src/main/java/com/vaadin/client/widgets/Grid.java
+++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java
@@ -7809,8 +7809,11 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
}
}
- assert cell != null : "received " + eventType
- + "-event with a null cell target";
+ if (cell == null) {
+ getLogger().log(Level.WARNING,
+ "received " + eventType + "-event with a null cell target");
+ return;
+ }
eventCell.set(cell, getSectionFromContainer(container));
GridEvent<T> gridEvent = new GridEvent<>(event, eventCell);