Knochenmark / gatsby-starter-level-2

Gatsby Starter Portfolio - Level 2
https://gatsby-starter-level-2.netlify.app
MIT License
38 stars 12 forks source link

Fix back-to-top button #135

Open Knochenmark opened 3 years ago

Knochenmark commented 3 years ago

Button is there, but must have been broken with the Gatsby 3 migration

trybick commented 3 years ago

When I click it, it seems to work

Knochenmark commented 3 years ago

I figured it seems to be my adblocker that is removing the button. Therefore it might just be a case of finding a classname that isn't on the blacklist of the adblocker. I had a similar issue before with the "social-icons".

If you are eager to fix it. I'm using "AdBlock" on Chrome.

It looks like the button is targeted by the aria-label & a data-attr with test-id.

trybick commented 3 years ago

Gotcha, I can give that a shot

trybick commented 3 years ago

It looks like the data-test-id is hardcoded into that library https://github.com/dirtyredz/react-scroll-up-button/blob/master/src/react-scroll-up-button.js#L180

This may require more digging that I'm able to commit to at the moment

Knochenmark commented 3 years ago

@trybick Ok, but you could reproduce it as well, right? Thanks for trying though.

Worst case I have to drop and replace that scroll up library

trybick commented 3 years ago

I use uBlock for chrome for adblocking so I didn't try with that extension. If you haven't already maybe try incognito mode without that extension and then enable that extension in incognito to make sure that's the cause.

Knochenmark commented 3 years ago

Yeah, it's working on incognito and when I disable the extension. It worked before, so my assumption is, that the button was just added to some official list at some point. Unfortunately it's targeted via that testing-id attribute too and not just by that aria-label.