Skip to content

Conversation

@dpvc
Copy link
Member

@dpvc dpvc commented Oct 19, 2025

This PR changes command-based menu items to process the press() method on mouse up rather than mouse down, so that the mouseup event ge4ts processed by the menu rather than being passed on to whatever is behind the menu. That is important, for example, when a dialog is opened, so that the mouse doesn't cancel the dialog.

This also means you can click on a menu item and then move off the menu item to prevent its action from being taken, as with most os system menus.

@dpvc dpvc requested a review from zorkow October 19, 2025 19:36
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One typo and one suggestion for the comment.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressor implied.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expressor implied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

}

/**
* Do the press on mouseup so menu gets the mouse up rather than a dialog box
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Do the press on mouseup so menu gets the mouse up rather than a dialog box
* Perform press on mouseup so menu gets the mouse up rather than a dialog box

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants