瀏覽代碼

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
tags/8.10.0.alpha1
Anna Koskinen 4 年之前
父節點
當前提交
7e44bb38e1
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增2 行删除
  1. 5
    2
      client/src/main/java/com/vaadin/client/widgets/Grid.java

+ 5
- 2
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);

Loading…
取消
儲存