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

fix(all): long press now preserves activated state #25551

Merged
merged 4 commits into from Jun 30, 2022
Merged

fix(all): long press now preserves activated state #25551

merged 4 commits into from Jun 30, 2022

Conversation

liamdebeasi
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue URL: resolves #25544

See #25544 (comment) for technical explanation.

What is the new behavior?

  • Removed contextmenu event listener
  • Updated onMouseDown function to return early if the secondary mouse button was pressed.

Note: This change means that the .ion-activated class will remain when long pressing on a button. However, long pressing does not necessarily mean the browser will fire a click event. The tap click utility should not be used as an indicator as to whether or not a click event will fire as the browser can cancel it for various reasons. This behavior brings Android in line with iOS (iOS does not fire contextmenu at the moment, so this bug never happened on iOS).

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added the package: core @ionic/core package label Jun 28, 2022
@liamdebeasi liamdebeasi marked this pull request as ready for review June 28, 2022 15:07
@liamdebeasi liamdebeasi requested a review from a team as a code owner June 28, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: ion-activated class removed when contextmenu event
2 participants