sindresorhus/refined-github

Multiple eye icons #4067

Milo123459 posted onGitHub

<!-- Thanks for reporting a bug! ⛰ Make sure the bug is caused by Refined GitHub. Try disabling the extension first. Show us the bug and help us replicate it, include: 1. A REAL URL where the bug appears. If it happens on a private repo, find an equivalent public URL. 2. A screenshot/video/gif of the issue, if it’s visual. 3. Any related errors in the browser’s console, if any. -->

img https://github.com/harryfei/which-rs/pull/30

This only happens occasionally.


Reproduction step navigate in and out of the issue/pr NOTE: It doesn't have to be the same issue or pr like the video

https://user-images.githubusercontent.com/26524089/110222889-5a6f1180-7ede-11eb-9398-a6d104dfcc97.mp4

posted by ahmed2m about 4 years ago

Yes. How can you turn on that "bugs" tab system?

posted by Milo123459 about 4 years ago

Yes. How can you turn on that "bugs" tab system?

It's a feature in this very extension, bugs-tab

posted by ahmed2m about 4 years ago

This is strange, I saw that only once, and then I couldn’t replicate it. The code has deduplication logic but it seems to fail at times in this case.

posted by fregante about 4 years ago

I found the cause: for some reason GitHub doesn't trigger pjax:start, so deinit doesn't run.

I doubt this is something like #3945 (pardon me if I'm wrong, I didn't read the entire issue, just based on my guessing), similiar issues (some function doesn't run across page navigation) have been around for some months.

EDIT: GitHub's firing PJAX events on #js-repo-pjax-container now. (or maybe they are always doing that, just not propagating anymore).

Real cause:

  1. When observer.observe('.some-selector') is called, .some-selector is added to observer.selectorSet
  2. When observer.disconnect() is called, .some-selector isn't removed from observer.selectorSet
  3. Duplicate selectors are added into observer.selectorSet in init, so multiple eyes are added 👀

Solution: if we want to reuse the observer, we should use the observer = observe('.selector'), then use observer.abort() in deinit.

posted by kidonng about 4 years ago

Feature disabled via hotfix. It'll be re-enabled in the next version sometime this week

posted by fregante about 4 years ago

Fund this Issue

$0.00
Funded

Pull requests