RFR: 8228363: ContextMenu.show with side=TOP does not work the first time in the presence of CSS [v3]

Robert Lichtenberger rlichten at openjdk.java.net
Wed Jan 27 12:14:55 UTC 2021


On Wed, 27 Jan 2021 11:21:19 GMT, Ajit Ghaisas <aghaisas at openjdk.org> wrote:

>> Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8228363: ContextMenu.show with side=TOP does not work the first time in the presence of CSS
>>   
>>   Removed node orientation from API doc.
>>   Removed extra blank lines.
>
> modules/javafx.controls/src/main/java/javafx/scene/control/ContextMenu.java line 312:
> 
>> 310:         if (getItems().size() == 0) return;
>> 311:         getScene().setNodeOrientation(anchor.getEffectiveNodeOrientation());
>> 312:         setAnchorLocation(AnchorLocation.CONTENT_TOP_LEFT);
> 
> Do we need to handle RTL case here?

I don't think so.
At least we didn't handle the RTL case here until now. The call to setAnchorLocation(AnchorLocation.CONTENT_TOP_LEFT); is only neccessary to "reset" the anchor location in case we called show with a Side before.

-------------

PR: https://git.openjdk.java.net/jfx/pull/383


More information about the openjfx-dev mailing list