Fix/prevent MazeMap iframe from unintuitive scroll behaviour#531
Open
kristiangjestad wants to merge 1 commit into
Open
Fix/prevent MazeMap iframe from unintuitive scroll behaviour#531kristiangjestad wants to merge 1 commit into
kristiangjestad wants to merge 1 commit into
Conversation
Adds a transparent overlay over the MazeMap iframe so page scrolling works normally when passing the map. Clicking the map activates interaction; pointer leaving the map restores the overlay.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the UX of the embedded MazeMap by preventing the iframe from hijacking page scroll, using a transparent overlay that enables map interaction only after an explicit click.
Changes:
- Added an “activation” state to gate iframe interaction behind a click-to-interact overlay.
- Wrapped the iframe in a positioned container and introduced an absolute overlay layer to intercept pointer/scroll until activated.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/app/_components/MazeMap/MazeMap.tsx | Adds overlay + active state so normal page scrolling works until the map is explicitly activated. |
| src/app/_components/MazeMap/MazeMap.module.scss | Adds wrapper/overlay styles to position the iframe and overlay correctly. |
Comment on lines
+48
to
+52
| <div | ||
| className={style.MazeMapOverlay} | ||
| onClick={() => setActive(true)} | ||
| title="Klikk for å interagere med kartet" | ||
| /> |
Member
|
This is nice. One thing that has nothing to with this but which I would change right away is the default params. should not default to any location if we really want to have it default to Lophtet we should make MazeMapLophtet which binds params |
JohanHjelsethStorstad
requested changes
Jul 19, 2026
JohanHjelsethStorstad
left a comment
Member
There was a problem hiding this comment.
Maybe just add this small thing I commented to this PR and also look at copilot's suggestion.
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.
Adds a transparent overlay over the MazeMap iframe so page scrolling works normally when passing the map. Clicking the map activates interaction and scolling turns to zooming; pointer leaving the map restores the overlay.