diff options
author | Anna Koskinen <Ansku@users.noreply.github.com> | 2020-10-13 12:21:02 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-13 12:21:02 +0300 |
commit | 05f7734b868ea41b0a2047dec304945f515c1c2f (patch) | |
tree | a778bb3c31546a8eeedd5bbafddf374979ca64f4 | |
parent | e3b0a113b112724923f326806c7e618e1f01cee0 (diff) | |
download | vaadin-framework-05f7734b868ea41b0a2047dec304945f515c1c2f.tar.gz vaadin-framework-05f7734b868ea41b0a2047dec304945f515c1c2f.zip |
Take border into account in Grid editor position when it opens upwards. (#12118)
-rwxr-xr-x | client/src/main/java/com/vaadin/client/widgets/Grid.java | 7 | ||||
-rwxr-xr-x | uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png | bin | 48169 -> 48135 bytes | |||
-rwxr-xr-x | uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png | bin | 48683 -> 48661 bytes |
3 files changed, 4 insertions, 3 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 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<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(); } diff --git a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png Binary files differindex cd676d0a14..627d564015 100755 --- a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png +++ b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__noscroll.png diff --git a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png Binary files differindex fc3b459af2..3470c6e092 100755 --- a/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png +++ b/uitest/reference-screenshots/chrome/GridEditorFrozenColumnsUITest-testEditorWithFrozenColumns_ANY_Chrome__scrolled.png |