diff options
author | Tatu Lund <tatu@vaadin.com> | 2020-04-21 15:42:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 15:42:47 +0300 |
commit | fe46753372d472c8c2359dcd0bd3e17b14593923 (patch) | |
tree | f5fb833b0465ce0cd4e7e974c9f1e93d2d082ace /compatibility-client | |
parent | 74f36e731db60f3ecaf9f57e2e4cc42095f0dd10 (diff) | |
download | vaadin-framework-fe46753372d472c8c2359dcd0bd3e17b14593923.tar.gz vaadin-framework-fe46753372d472c8c2359dcd0bd3e17b14593923.zip |
Fix incorrect position of column selector in MPR (#11953)
Cherry pick from
https://github.com/vaadin/framework/pull/11946
Diffstat (limited to 'compatibility-client')
-rw-r--r-- | compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java index 36b1468bbd..4b0a52c1bd 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java @@ -3931,10 +3931,12 @@ public class VScrollTable extends FlowPanel public void onBrowserEvent(Event event) { if (enabled) { if (event.getEventTarget().cast() == columnSelector) { - final int left = DOM.getAbsoluteLeft(columnSelector); - final int top = DOM.getAbsoluteTop(columnSelector) + WidgetUtil.TextRectangle clientRect = WidgetUtil + .getBoundingClientRect(columnSelector); + final int left = (int) clientRect.getLeft(); + final int top = (int) (clientRect.getTop() + DOM.getElementPropertyInt(columnSelector, - "offsetHeight"); + "offsetHeight")); client.getContextMenu().showAt(this, left, top); } } |