RFR: 8228363 Fix shifts for ContextMenu shown on TOP/LEFT side
abhinay_agarwal at live.com
Fri Feb 7 16:33:12 UTC 2020
The issue is caused because of a fix which was pushed as a part of https://bugs.openjdk.java.net/browse/JDK-8159044
The root cause of the issue is that ContextMenuSkin#performPopupShifts doesn't consider the cases where shiftX / shiftY can be negative, just as in case of the example provided by Robert in 8228363. Moreover, these shifts are only required for Side.TOP and Side.LEFT.
My fix tries to find a solution to this problem using properties map as side, dx, dy passed to ContextMenu#show(Node anchor, Side side, double dx, double dy) are not exposed by the control and cannot be accessed by Skin. I am not sure if it is the best way to do it.
Any feedback on the changes are appreciated.
More information about the openjfx-dev