-
Notifications
You must be signed in to change notification settings - Fork 460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8245575: Show the ContextMenu of input controls with long press gesture on iOS #232
Conversation
👋 Welcome back jpereda! A progress list of the required criteria for merging this PR into |
[self sendJavaMouseEvent:viewPoint type:com_sun_glass_events_MouseEvent_ENTER button:com_sun_glass_events_MouseEvent_BUTTON_NONE]; | ||
[self sendJavaMouseEvent:viewPoint type:com_sun_glass_events_MouseEvent_DOWN button:com_sun_glass_events_MouseEvent_BUTTON_RIGHT]; | ||
} else if (sender.state == UIGestureRecognizerStateEnded) { | ||
// Prevent touch ended event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no release event needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "right-click" event (enter+right down) is simulated when the long press event is detected (UIGestureRecognizerStateBegan
, which happens after 0.5 seconds by default). This will trigger the ContextMenu.
However, the user is still pressing for a few more time. After releasing the tap, (UIGestureRecognizerStateEnded
), there is no need of adding a release event (exit+right up), as this probably will close the ContextMenu. The user now can select any of the options from the menu, or simply tap elsewhere to close it.
@jperedadnr This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 18 commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge As you do not have Committer status in this project, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@johanvos) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
@jperedadnr |
/sponsor |
@johanvos @jperedadnr The following commits have been pushed to master since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit afa805f. |
This PR uses iOS long press gesture to generate a menu event that will trigger a
ContextMenuEvent
.Based on this event, input controls will show the ContextMenu (once JDK-8245499 is fixed), and if required, a developer could add an event handler based on
ContextMenuEvent.CONTEXT_MENU_REQUESTED
for custom processing of such event.Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/232/head:pull/232
$ git checkout pull/232