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

When Hajk is embedded focus should be disabled to prevent the site from "jumping" to the map #1113

Closed
jacobwod opened this issue Jun 17, 2022 · 1 comment
Assignees
Milestone

Comments

@jacobwod
Copy link
Member

Describe the bug
Embedded solutions that place the map solution outside of the viewport will automatically scroll down, so that Hajk becomes visible. This is due to an autofocus behaviour.

To Reproduce
Check this out: https://www.halmstad.se/byggaboochmiljo/stadsplaneringochbyggande/detaljplanering/pagaendedetaljplaner.n1202.html

@jacobwod jacobwod added this to the 3.x milestone Jun 17, 2022
@jacobwod jacobwod modified the milestones: 3.x, 3.11 Jun 17, 2022
@jacobwod jacobwod self-assigned this Jun 17, 2022
@jacobwod
Copy link
Member Author

Found a solution. Added it to the Wiki.

Short summary: ensure that the Iframe's contents are hidden until loaded by adding the style and onload attributes to your <iframe>:

<iframe
    src="http://hajk.example.com/?m=map_1&x=110045.47067712664&y=6287011.024308603&z=0&l=58,205,100&clean=true"
    style="display: none"
    onload="this.style.display='block';"
  />

@jacobwod jacobwod closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant