]> source.dussan.org Git - vaadin-framework.git/commitdiff
Take border into account in Grid editor position when it opens upwards. (#12118)
authorAnna Koskinen <Ansku@users.noreply.github.com>
Tue, 13 Oct 2020 09:21:02 +0000 (12:21 +0300)
committerGitHub <noreply@github.com>
Tue, 13 Oct 2020 09:21:02 +0000 (12:21 +0300)
client/src/main/java/com/vaadin/client/widgets/Grid.java
uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png
uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png

index ebf5c8ca960918664d916793385394fc1583569a..a47cc4bfcaf7616898283b0daeee0de130c8da8a 100755 (executable)
@@ -2040,9 +2040,10 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>,
                 // 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();
             }
 
index cd676d0a144567be4b60d0199cd521949485f527..627d5640153220bc10d8cb6c4ef2e638f51975b5 100755 (executable)
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
index fc3b459af2abcd86a12e03eaa888c124f0cc2e85..3470c6e0924c59716ed2bd687e11131fc0033eca 100755 (executable)
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