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

Quote Hash Navigation: Partially blocked by the header #10

Closed
AlifianK opened this issue Dec 20, 2023 · 4 comments
Closed

Quote Hash Navigation: Partially blocked by the header #10

AlifianK opened this issue Dec 20, 2023 · 4 comments

Comments

@AlifianK
Copy link

It looks like clicking the quote hash in 4chanXT will make the post partially blocked when the header is shown. This is 4chanXT:
image

This is 4chanX:
image

Note: the 4chanX one is captured on Firefox, and 4chanXT is on Edge.

@TuxedoTako
Copy link
Owner

Like I already said in https://boards.4chan.org/g/thread/97970578#p98000834

So, I think I found the cause: the code used an old MessageChannel() hack to delay code, to not block the UI. I found it ugly and replaced it with a Promise.resolve().then. The old scroll logic relied on it being called after the browsers build in scroll, and corrected after that. But with the new code, it runs the custom scroll correction first, and then the browser's scroll.

I have to work at my job this week. You can expect a new version with the fix early next week at the latest.

@saxamaphone69
Copy link

I had previously questioned some alternative ways to do scroll-related code (ccd0#1227 and ccd0#2935). Not sure if that's another avenue that could be taken.

There is also the CSS way to offset it:

.post { scroll-margin-top: 24px; }

@TuxedoTako
Copy link
Owner

Can you test 2.2.5?

There is also the CSS way to offset it:

.post { scroll-margin-top: 24px; }

Thanks for the suggestion. Using less script for things CSS can do is often better. I did have to replace overflow: hidden; with overflow: clip; for this to work, so I had to bump the minimum chrome to 90. Let me know if that's a problem.

@AlifianK
Copy link
Author

Thanks for the release, I can confirm it's fixed.
image

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

3 participants