Skip to content

Stop claat focus scrolling day plans to the Problem Solving Workshop - #4

Merged
illicitonion merged 1 commit into
mainfrom
fix-iframe-focus-scroll
Sep 30, 2026
Merged

illicitonion merged 1 commit into
mainfrom
fix-iframe-focus-scroll

Conversation

@abdishakoor-dev

@abdishakoor-dev abdishakoor-dev commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Three ITP curriculum day plan page embed a Problem Solving Workshop from codewars-workshops.codeyourfuture.io (JS Fundamentals sprint 3, Testing sprints 1 and 3). About a second after load, each one jumps down to the workshop iframe, whether the trainee opened the page at the top or at a section link such as #screen-safari. Example: https://curriculum.codeyourfuture.io/itp/testing/sprints/1/day-plan/#screen-safari

This happens because claat's codelab-elements.js focuses the current step, and focusing inside an iframe scrolls the parent page.

A small script now loads before codelab-elements.js. When the page is framed, it forces preventScroll on focus() calls. Opened directly, pages behave as before, and keyboard step navigation still works. build.sh fails if the script is not injected into every page.

codelab-elements.js focuses the current step, which scrolls an embedding
page to the iframe. When framed, force preventScroll on focus() calls.
@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cyf-codewars-workshops ready!

Name Link
🔨 Latest commit 2978f18
🔍 Latest deploy log https://app.netlify.com/projects/cyf-codewars-workshops/deploys/6abd29e0514ca4000829eb49
😎 Deploy Preview https://deploy-preview-4--cyf-codewars-workshops.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@abdishakoor-dev abdishakoor-dev changed the title Stop embedded problem pages scrolling the curriculum page on load Stop claat focus scrolling day plans to the Problem Solving Workshop Sep 30, 2026

@illicitonion illicitonion left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@illicitonion
illicitonion merged commit 6357adc into main Sep 30, 2026
6 checks passed
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.

2 participants