On Tue, 8 Apr 2025 18:20:17 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TableColumnHeader.java
>>  line 251:
>> 
>>> 249:         me.consume();
>>> 250: 
>>> 251:         header.getTableHeaderRow().columnDragLock = true;
>> 
>> On Mac a context menu can be invoked using the right button or the left 
>> button in conjunction with the Control key. In the second case the pop 
>> trigger flag will be set and the primary button will be down. If I'm reading 
>> the code correctly this could get the header stuck in column re-ordering 
>> mode.
>
> Testing on macOS 15.3.2, it does not get stuck when using control+left-click, 
> works as expected.
> 
> There is one (existing and unrelated) problem - if the user tries to dismiss 
> the popup menu by clicking on the header, it dismisses the popup (correctly), 
> but then proceeds to re-sort the table (unexpected).
> 
> One can say it works as designed, since the click falls on a header cell and 
> the expected operation is to toggle the sorting, with the side effect of 
> dismissing the popup.
> 
> On the other hand, Excel (both mac and windows) behaves differently - a click 
> on the spreadsheet header dismisses the popup and does not select the column, 
> as it normally does when no popup is present.
> 
> What do you guys think?

control+left-click works as expected for me too.

When the context menu is showing, clicking anywhere outside of it, closes the 
popup (because of the autohide property), but doesn't consume the event. If you 
click on a button, for instance, it will be fired. In any case, this is the 
same before and after this PR, so maybe an issue for a later discussion.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1754#discussion_r2034048101

Reply via email to