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: use button property for data-tauri-drag-region mouse button detection, closes #7694 #7746

Merged
merged 1 commit into from
Sep 7, 2023

Conversation

pewsheen
Copy link
Contributor

@pewsheen pewsheen commented Sep 4, 2023

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #____
  • No

Checklist

  • When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • I have added a convincing reason for adding this feature, if necessary

Other information

#7694

Updated the data-tauri-drag-region attribute to use the button property instead of the buttons property to check if the left mouse button was pressed.

This change is intended to fix an issue that if the "Tap to Click" option is enabled on the macOS, event.buttons will return 0 and 1 randomly when tapping the element.

Behavior changed
Before this patch, the drag event will be triggered only when the left mouse button is pressed. In this patch, if multiple mouse buttons are clicked along with the left mouse button simultaneously, it would see as the left mouse button clicked and trigger the drag event.

@pewsheen pewsheen requested a review from a team as a code owner September 4, 2023 15:16
Copy link
Member

@amrbashir amrbashir left a comment

Choose a reason for hiding this comment

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

I wouldn't consider this a breaking change but just to make sure, I will cc @lucasfernog

@lucasfernog lucasfernog merged commit 0797a00 into tauri-apps:1.x Sep 7, 2023
4 checks passed
@pewsheen pewsheen deleted the tap-drag-region branch January 31, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔎 In audit
Development

Successfully merging this pull request may close these issues.

None yet

3 participants