Incorrect scrollX/scrollY value when use meta viewport in RDM
Categories
(Core :: Layout: Scrolling and Overflow, defect)
Tracking
()
People
(Reporter: noiseyou99, Unassigned)
Details
Attachments
(2 files)
|
575 bytes,
text/html
|
Details | |
|
646 bytes,
patch
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Firefox for Android
Steps to reproduce:
- set pref dom.meta-viewport.enabled to true
- Use Inspect and responsive => 240 x 375
- open/use attachment html
- scrollTo(0,30) and scrollY is 0 -- KO
- scrollTo(30,0) and scrollX is 0 -- KO
Actual results:
Incorrect scrollX/scrollY
scrollTo(0,30) and scrollY is 0
scrollTo(30,0) and scrollX is 0
Expected results:
scrollTo(0,30) and scrollY is 30
scrollTo(30,0) and scrollX is 30
Comment 1•4 years ago
|
||
That's because the root element is not scrollable. If you scroll the content by hand (mouse wheel or some) and query document.scrollingElement.scrollTop then you will see 0. Instead visualViewport.offsetTop is not 0.
Comment 2•4 years ago
|
||
Weird, scrollTo(0, 30) worked now. There's definitely something I am missing.
Comment 3•4 years ago
|
||
This is something in RDM. On mobile scrollTo works always, but in RDM window.scrollMaxY and window.scrollMaxX are zero in the case where scrollTo doesn't work.
I think something wrong in UpdateMinimumScaleSize,
I try this patch/attachment, it can work fine.
Comment 5•4 years ago
|
||
As I commented in Matrix, the change doesn't look correct to me. Whether we apply the minimum scale or not is not affected by the current zoom level.
Comment 6•4 years ago
|
||
Anyway, I confirmed this issue yesterday.
Also note that setting "dom.meta-viewport.enabled" is not necessary to reproduce this issue.
Updated•4 years ago
|
(In reply to Hiroyuki Ikezoe (:hiro) from comment #6)
Anyway, I confirmed this issue yesterday.
Also note that setting "dom.meta-viewport.enabled" is not necessary to reproduce this issue.
Hi,
How to reproduce this issue when "dom.meta-viewport.enabled" is flase?
(In reply to Hiroyuki Ikezoe (:hiro) from comment #6)
Anyway, I confirmed this issue yesterday.
Also note that setting "dom.meta-viewport.enabled" is not necessary to reproduce this issue.
Hi,
How to reproduce this issue when "dom.meta-viewport.enabled" is flase?
Comment 9•4 years ago
|
||
In RDM even if "dom.meta-viewport.enabled" is false, it properly emulates mobile viewport stuff.
Description
•