Repository navigation
JTech theme: stop Safari topic scroll bounce and load jump - #455
Merged
Merged
Conversation
Move span:not(:has(*)) out of :is() in jt-profile.scss so Safari does not shift the scroll position when core cloaks posts inside .posts-wrapper, and turn scroll anchoring off on html on topic pages so Safari does not anchor below .posts-wrapper and jump past newly loaded batches. Closes #430.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #312 (closes #430):
> span:not(:has(*))out of:is(...)inthemes/jtech/stylesheets/jt-profile.scss. Inside:is(), Safari couldn't index the rule by tag and shifted the scroll position whenever Discourse cloaked a post inside.posts-wrapper(container-type: inline-size), causing scrolling to bounce back and stall before the next batch loaded.overflow-anchor: noneonhtml:has(.container.posts)inthemes/jtech/stylesheets/jt-extras.scssso Safari doesn't anchor to content below.posts-wrapperand jump past newly loaded batches of posts.Affected module(s)
Test plan
./node_modules/.bin/prettier "themes/jtech/{common,stylesheets}/*.scss" --checkclean./node_modules/.bin/stylelint "themes/jtech/**/*.scss"cleannode --experimental-strip-types --no-warnings scripts/check-languages.mtscleanspec/system/jtech_theme_part4_spec.rbupdated to assertoverflow-anchor: noneonhtmlon topic pages and that no theme stylesheet puts:not(:has(*))inside:is(...)(verified regex catches the pre-fixjt-profile.scssand passes on the fix; full system spec + RuboCop will run in CI)Checklist
pnpm lintis clean (SCSS prettier, stylelint, and language checks verified locally; full CI pending)bundle exec rubocopis clean (pending CI)config/locales/server.en.ymlorclient.en.yml(N/A)