Skip to content

JTech theme: stop Safari topic scroll bounce and load jump - #455

Merged
TripleU613 merged 1 commit into
mainfrom
fix/safari-topic-scroll-430
Nov 30, 2026
Merged

TripleU613 merged 1 commit into
mainfrom
fix/safari-topic-scroll-430

Conversation

@TripleU613

Copy link
Copy Markdown
Owner

Summary

Follow-up to #312 (closes #430):

  • Move > span:not(:has(*)) out of :is(...) in themes/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.
  • Set overflow-anchor: none on html:has(.container.posts) in themes/jtech/stylesheets/jt-extras.scss so Safari doesn't anchor to content below .posts-wrapper and jump past newly loaded batches of posts.

Affected module(s)

  • Moderator tools
  • Mini-mod
  • Dislike
  • Disteleplus
  • REQ-PM
  • Mod elections
  • Dumbcourse
  • Smart search
  • Pop-ups
  • Another SMTP
  • Translator tweaks
  • JTech theme
  • Shared (plugin.rb, settings, locales, docs, lint/CI)

Test plan

  • ./node_modules/.bin/prettier "themes/jtech/{common,stylesheets}/*.scss" --check clean
  • ./node_modules/.bin/stylelint "themes/jtech/**/*.scss" clean
  • node --experimental-strip-types --no-warnings scripts/check-languages.mts clean
  • spec/system/jtech_theme_part4_spec.rb updated to assert overflow-anchor: none on html on topic pages and that no theme stylesheet puts :not(:has(*)) inside :is(...) (verified regex catches the pre-fix jt-profile.scss and passes on the fix; full system spec + RuboCop will run in CI)

Checklist

  • pnpm lint is clean (SCSS prettier, stylelint, and language checks verified locally; full CI pending)
  • bundle exec rubocop is clean (pending CI)
  • New / changed settings have entries in config/locales/server.en.yml or client.en.yml (N/A)
  • New / changed behavior has a spec (a bug fix has one that fails without it)
  • Follows the repository rules: no access past core, visibility checked, nothing core already does
  • No Ruby file references a non-existent setting name

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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T20:26:13.757455Z 4ac0a8d PR opened
🔒 Security Review ✅ Completed 2026-11-30T20:26:50.385786Z 4ac0a8d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@TripleU613
TripleU613 merged commit 4d965b4 into main Nov 30, 2026
11 of 13 checks passed
@TripleU613
TripleU613 deleted the fix/safari-topic-scroll-430 branch November 30, 2026 20:41
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

Successfully merging this pull request may close these issues.

[BUG] Safari: topic scrolling bounces back and gets stuck near the end of loaded posts (follow-up to #309)

1 participant