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

[BUG] Tabs pin themselves on their own #30

Closed
phoriah opened this issue Jul 26, 2023 · 8 comments
Closed

[BUG] Tabs pin themselves on their own #30

phoriah opened this issue Jul 26, 2023 · 8 comments

Comments

@phoriah
Copy link

phoriah commented Jul 26, 2023

How to reproduce:

  1. Go to any big pages (big enough for scrollbar to appear), even some css files in this repository work as example
  2. Click & Hold the scrollbar without moving it
  3. The tab will pin / unpin itself depending on the current state

That's what happens to me personally.
It also happens on sites that are gallery-like, where there's a button to go to next image like in a slideshow and if you were to hold that button for long enough the site would pin / unpin itself.

This also causes another extension (https://github.com/dessant/search-by-image) to automatically pin all ShutterStock pages that it opens (not sure if it's the same issue as the one causing this but there's definitely something up with that too)

Note: this is pretty annoying and took me months to figure out what's causing it.

@jbhoot
Copy link
Owner

jbhoot commented Jul 27, 2023

Click & Hold the scrollbar without moving it...The tab will pin / unpin itself depending on the current state

First things first: Long click (i.e., holding a left mouse click for a configurable amount of milliseconds) on non-interactive portions of a webpage to pin/unpin its tab is an add-on feature. You can disable it in the add-on preferences.

If you know that already, and your problem is only the long-click on a non-moving scrollbar, then read further.

Detecting a click on a scrollbar is not foolproof. Edge cases break it all the time. However, detecting a moving scrollbar is easy.

So, a long-click on a static scrollbar would trigger the pinning, but if the scrollbar is moved, then the trigger is cancelled.

Generally, scrollbar is clicked on in order to move it. So, I found it acceptable to not implement a buggy scrollbar detection, but instead treat a static scrollbar as one of the long-clickable areas of the webpage.

@jbhoot
Copy link
Owner

jbhoot commented Jul 27, 2023

Note: this is pretty annoying and took me months to figure out what's causing it.

This is a valid concern. Perhaps, the whole problem wouldn't have bothered you much if there had been a "pinning/unpinning" indicator of sorts that appears on a long click.

May be animating the add-on icon close to the cursor to indicate the trigger could suffice. I will look into the feasibility.

@jbhoot
Copy link
Owner

jbhoot commented Jul 27, 2023

That's what happens to me personally.
It also happens on sites that are gallery-like, where there's a button to go to next image like in a slideshow and if you were to hold that button for long enough the site would pin / unpin itself.

Long clicking on buttons should not trigger the add-on. Could you tell me the website on which this happened?

@phoriah
Copy link
Author

phoriah commented Jul 27, 2023

Any page that has a scrollbar, even this one.
Video example below (note: all extensions but yours are disabled)
https://github.com/jyssh/pin-unpin-tab/assets/95628489/ff164306-9139-400d-aead-5d14cd22911f

@jbhoot
Copy link
Owner

jbhoot commented Jul 27, 2023

Any page that has a scrollbar, even this one. Video example below (note: all extensions but yours are disabled) https://github.com/jyssh/pin-unpin-tab/assets/95628489/ff164306-9139-400d-aead-5d14cd22911f

Could you please read all of my above responses first? The first response tries to address what you demonstrated in the above linked video.

@phoriah
Copy link
Author

phoriah commented Jul 27, 2023

Any page that has a scrollbar, even this one. Video example below (note: all extensions but yours are disabled) https://github.com/jyssh/pin-unpin-tab/assets/95628489/ff164306-9139-400d-aead-5d14cd22911f

Could you please read all of my above responses first? The first response tries to address what you demonstrated in the above linked video.

I did read them, albeit I couldn't make much sense of it (sorry). Nor do I see how that would solve the problem, I'm pointing out a possible bug and the only logical solution to it I could imagine is it being removed / fixed, I don't see how an animation would fit anywhere here as it doesn't solve the issue. I hope you see where I'm coming from.

@jbhoot
Copy link
Owner

jbhoot commented Jul 27, 2023

Go to the add-on's preferences.

If you untick the checkbox as shown in the screenshot below, then your problem should go away.

Screenshot 2023-07-27 at 8 48 07 PM

@phoriah
Copy link
Author

phoriah commented Jul 27, 2023

Go to the add-on's preferences.

If you untick the checkbox as shown in the screenshot below, then your problem should go away.
Screenshot 2023-07-27 at 8 48 07 PM

Omg, sorry for being blind. This does indeed solve my issue.

@phoriah phoriah closed this as completed Jul 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants