Discussion:
[chromium-discuss] Mobile devices: zoom and javascript scroll
Nikita Pankov
2018-10-30 17:59:18 UTC
Permalink
Hello,

Recently I met strange (from my point of view) behaviour in Chrome: When
you zoom the page, the screen gets smaller than the viewport and therefore
needs to panned to view parts of the viewport's content.
But when you call functions like element,scrollIntoView() (or even
window.scroll()): this scrolls the page in viewport but leaves the screen
in the same position. So element.scrollIntoView() seems to be inadequate.

I couldn't find any issues in the tracker and couldn't find a way to move
the screen around the viewport using javascript.
So I can't get my element in the user's attention area in the center of the
screen.

Thank You.
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Rick Byers
2018-12-10 20:03:35 UTC
Permalink
I thought scrollIntoView was supposed to ensure the element was visible in
the visible viewport (not just the layout viewport). +bokan
This is all about Visual Viewport API, but unfortunately this is read only
- I can see no way to move the visible viewport :( Only touch event
simulations.
Post by Nikita Pankov
Hello,
Recently I met strange (from my point of view) behaviour in Chrome: When
you zoom the page, the screen gets smaller than the viewport and therefore
needs to panned to view parts of the viewport's content.
But when you call functions like element,scrollIntoView() (or even
window.scroll()): this scrolls the page in viewport but leaves the screen
in the same position. So element.scrollIntoView() seems to be inadequate.
I couldn't find any issues in the tracker and couldn't find a way to move
the screen around the viewport using javascript.
So I can't get my element in the user's attention area in the center of
the screen.
Thank You.
--
--
http://groups.google.com/a/chromium.org/group/chromium-discuss
--
--
Chromium Discussion mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+***@chromium.org.
Loading...