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

Page jumps when keyboard query activated #694

Closed
prushforth opened this issue Nov 15, 2022 · 1 comment · Fixed by #724
Closed

Page jumps when keyboard query activated #694

prushforth opened this issue Nov 15, 2022 · 1 comment · Fixed by #724
Assignees
Labels
Milestone

Comments

@prushforth
Copy link
Member

https://geogratis.gc.ca/mapml/en/cbmtile/fdi/

When the <mapml-viewer> is a block element in a scrollable page, and the query reticle is displayed (because the map has focus), hitting spacebar (activating the query) causes the page to quickly and annoyingly scroll down then up. Hitting Enter also activates the query, but not the annoying scroll jump.

This doesn't happen when the map is the whole page, for example when fullscreen is active.

@prushforth prushforth added the bug label Nov 15, 2022
@Malvoz
Copy link
Member

Malvoz commented Nov 15, 2022

Space to scroll down is generally expected in normal documents, the scroll up happens because the popup receives focus.

It does make sense to prevent scroll down if the map element is focused. Such behavior can be seen in the <select> element (at least in Chrome), where Enter selects the focused option, and while Space does nothing, it also does not scroll the document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment