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

Maximize and minimize using soft touch on trackpad #80

Open
jr-dw-dev opened this issue Dec 8, 2022 · 5 comments
Open

Maximize and minimize using soft touch on trackpad #80

jr-dw-dev opened this issue Dec 8, 2022 · 5 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jr-dw-dev
Copy link

Describe the bug
If I use the soft touch of my Macbook trackpad and do not push it down physically in order to click the image to zoom in or out (maximizeOnClick and minimizeOnClick), it sometimes works and sometimes doesn't. This happens because the event.buttons property of the mouseDown-Event is randomly set to 0 or 1. As you check for it to be > 0, it randomly just does nothing.

It would be cool if you could remove the check for event.buttons > 0 from the handleMouseDown method for it to work on Macbooks again.

To Reproduce
Steps to reproduce the behavior:

  1. activate shouldMaximizeOnClick and/or shouldMinimizeOnClick
  2. Tap on the image using soft touch of trackpad multiple times
  3. randomly it will do what you expect it to do or just do nothing without an error

Expected behavior
maximize and minimize work with trackpad

Desktop (please complete the following information):

  • OS: iOS 12.6
  • Browser Chrome
  • Version 108.0.5359.94
@jr-dw-dev
Copy link
Author

Reproducable on Lenovo Thinkpad

@yifaneye
Copy link
Owner

Hi @jr-dw-dev , thanks for raising this issue up! I will investigate it next weekend!

@yifaneye yifaneye self-assigned this Dec 31, 2022
@yifaneye yifaneye added the bug Something isn't working label Dec 31, 2022
@yifaneye
Copy link
Owner

Hi @jr-dw-dev ! I can reproduce your bugs.
If I touch it fast (which I have already got used to), it always works as expected.
But, if I touch it slowly, it occasionally does not work. That's because there is movement in the touch, resulting in the touch being recognized as dragging the slide sideways.

@yifaneye yifaneye added the help wanted Extra attention is needed label Jan 28, 2023
@digitalwert-devs
Copy link

Sorry for responding only now. I have the same problem with clicking fast. But anyways, for us it ended in showing the button, which we originally didn't want to have.

So if I understand you correctly, the event.buttons > 0 should differentiate between dragging and clicking? Then it would probably be cool to implement a certain number of pixels which need to be moved to make it a swipe, anything under that could be a click.

@digitalwert-devs
Copy link

Are there any updates about this problem? It#s been more than a year now..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants