From: Anna Koskinen Date: Tue, 13 Oct 2020 09:21:02 +0000 (+0300) Subject: Take border into account in Grid editor position when it opens upwards. (#12118) X-Git-Tag: 7.7.23~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=05f7734b868ea41b0a2047dec304945f515c1c2f;p=vaadin-framework.git Take border into account in Grid editor position when it opens upwards. (#12118) --- 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 ebf5c8ca96..a47cc4bfca 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -2040,9 +2040,10 @@ public class Grid extends ResizeComposite implements HasSelectionHandlers, // overlay from the bottom editorOverlay.insertFirst(messageAndButtonsWrapper); int gridHeight = grid.getElement().getOffsetHeight(); - editorOverlay.getStyle().setBottom( - gridHeight - overlayTop - tr.getOffsetHeight(), - Unit.PX); + double borderHeight = WidgetUtil + .getBorderBottomThickness(editorOverlay); + editorOverlay.getStyle().setBottom(gridHeight - overlayTop + - tr.getOffsetHeight() + borderHeight, Unit.PX); editorOverlay.getStyle().clearTop(); } diff --git a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png index cd676d0a14..627d564015 100755 Binary files a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png and b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png differ diff --git a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png index fc3b459af2..3470c6e092 100755 Binary files a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png and b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png differ