Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

@jperedadnr
Copy link
Collaborator

jperedadnr commented May 22, 2020

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

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8245575: Show the ContextMenu of input controls with long press gesture on iOS

Reviewers

  • Johan Vos (jvos - Reviewer)

Download

$ git fetch https://git.openjdk.java.net/jfx pull/232/head:pull/232
$ git checkout pull/232

@bridgekeeper
Copy link

bridgekeeper bot commented May 22, 2020

👋 Welcome back jpereda! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@openjdk openjdk bot added the rfr label May 22, 2020
@mlbridge
Copy link

mlbridge bot commented May 22, 2020

Webrevs

@kevinrushforth kevinrushforth requested a review from johanvos May 26, 2020
[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

This comment has been minimized.

@johanvos

johanvos Jun 8, 2020 Collaborator

no release event needed?

This comment has been minimized.

@jperedadnr

jperedadnr Jun 8, 2020 Author Collaborator

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.

@openjdk
Copy link

openjdk bot commented Jun 8, 2020

@jperedadnr This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8245575: Show the ContextMenu of input controls with long press gesture on iOS

Reviewed-by: jvos
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 18 commits pushed to the master branch:

  • afa805f: 8245575: Show the ContextMenu of input controls with long press gesture on iOS
  • 5304266: 8245635: GlassPasteboard::getUTFs fails on iOS
  • ba501ef: 8246357: Allow static build of webkit library on linux
  • a02e09d: 8246195: ListViewSkin/Behavior: misbehavior on switching skin
  • 9749982: 8246204: No 3D support for newer Intel graphics drivers on Linux
  • 6bd0e22: 8239095: Upgrade libFFI to the latest 3.3 version
  • 853ac78: 8245282: Button/Combo Behavior: memory leak on dispose
  • a78b3fb: 8242523: Update the animation and clip envelope classes
  • 1ab653c: 8244657: ChoiceBox/ToolBarSkin: misbehavior on switching skin
  • 804ccce: 8244195: [TEST_BUG] Convert the system tests TabPanePermuteGetTabsTest to unit test
  • ... and 8 more: https://git.openjdk.java.net/jfx/compare/1971c701aff0b5b6bb32964ffa854d47d1c80bee...master

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 master into your branch, and then specify the current head hash when integrating, like this: /integrate afa805fe8b87f6d9bda60b69e9365ea521439cb7.

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 in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready label Jun 8, 2020
@jperedadnr
Copy link
Collaborator Author

jperedadnr commented Jun 8, 2020

/integrate

@openjdk openjdk bot added the sponsor label Jun 8, 2020
@openjdk
Copy link

openjdk bot commented Jun 8, 2020

@jperedadnr
Your change (at version 0cbed08) is now ready to be sponsored by a Committer.

@johanvos
Copy link
Collaborator

johanvos commented Jun 9, 2020

/sponsor

@openjdk openjdk bot closed this Jun 9, 2020
@openjdk openjdk bot added integrated and removed sponsor ready rfr labels Jun 9, 2020
@openjdk
Copy link

openjdk bot commented Jun 9, 2020

@johanvos @jperedadnr The following commits have been pushed to master since your change was applied:

  • 5304266: 8245635: GlassPasteboard::getUTFs fails on iOS
  • ba501ef: 8246357: Allow static build of webkit library on linux
  • a02e09d: 8246195: ListViewSkin/Behavior: misbehavior on switching skin
  • 9749982: 8246204: No 3D support for newer Intel graphics drivers on Linux
  • 6bd0e22: 8239095: Upgrade libFFI to the latest 3.3 version
  • 853ac78: 8245282: Button/Combo Behavior: memory leak on dispose
  • a78b3fb: 8242523: Update the animation and clip envelope classes
  • 1ab653c: 8244657: ChoiceBox/ToolBarSkin: misbehavior on switching skin
  • 804ccce: 8244195: [TEST_BUG] Convert the system tests TabPanePermuteGetTabsTest to unit test
  • 9edba9c: 8243110: SVGTest.testSVGRenderingWithPattern fails intermittently
  • 168b7f7: 8246099: Intermittent test failures in SandboxAppTest
  • c41777e: 8245634: [TestBug] Enable and fix tests ignored with message "impl_cssSet API removed"
  • 3ceee69: 8245499: Text input controls should show handles on iOS
  • 8914bd2: 8234540: javafx.web LeakTest.testGarbageCollectability fails intermittently
  • 16f446a: 8234876: Unit test classes should not extend Application
  • 2d98fe6: 8245601: TESTBUG] Disable TabPaneDragPolicyTest on Mac until JDK-8213136 is fixed and fix ISE
  • f3190db: 8244531: Tests: add support to identify recurring issues with controls et al

Your commit was automatically rebased without conflicts.

Pushed as commit afa805f.

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.