RFR: 8207333: [Linux, macOS] Column sorting is triggered always after context menu request on table header
Martin Fox
mfox at openjdk.org
Fri Apr 25 16:50:58 UTC 2025
On Thu, 24 Apr 2025 09:11:09 GMT, Jose Pereda <jpereda at openjdk.org> wrote:
>>> control+left-click works as expected for me too.
>>
>> For control+left-click it looks like the code will call `columnReordingStarted` but on the released event it won't call `columnReorderingComplete`. I have no idea if this will lead to problems or not.
>
> @beldenfox Do you think we should address that issue (ctrl+left click + columnReordering) in this PR? Else, do we need to do anything else to move it forward?
You should be good with a few tweaks. If the press event is a popup trigger don't set the columnDragLock or call columnReorderingStarted (since you might not get a release event). In the drag handler check popupTriggeredOnMousePressed and do nothing if it's set. Your released handler looks fine as-is. I think that should cover it.
By the way, in a perfect world you would have more predictable behavior. When the popup menu is shown it would grab the mouse pointer and you would never see the release event. That would allow the user to click to bring up the popup and start dragging across the menu items without having to release the mouse.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1754#discussion_r2060570967
More information about the openjfx-dev
mailing list