Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

window.pageXOffset and window.pageYOffset not working anymore

more options

Hi,

in earlier firefox versions window.pageXOffset gave the correct value from the left border of the website to the scrolled left screen border in pixels. After the last Update it doesn't matter where I move my screen to, it always says zero.

Is the feature removed or a bug? If it's removed, how I can get the window position relative to the viewport for javascript?

Firefox Version on Android: 63.0.2 last Update: 07.11.2018

Greetings,

Udo

Hi, in earlier firefox versions window.pageXOffset gave the correct value from the left border of the website to the scrolled left screen border in pixels. After the last Update it doesn't matter where I move my screen to, it always says zero. Is the feature removed or a bug? If it's removed, how I can get the window position relative to the viewport for javascript? Firefox Version on Android: 63.0.2 last Update: 07.11.2018 Greetings, Udo

모든 댓글 (3)

more options

I have not heard of this being removed. Is there a sample page which demonstrates the problem?

more options

Hi,

go to the Page:

https://ubxd.de/test/firefox_problem.php

there is a simple div Box. If you click the Box, the values of window.pageXOffset and window.pageYOffset gets shown inside the box.

If you open the site in Firefox for PC and make the window smaller that you can scroll the box, the values changing if you scroll to the right or down and press the box again.

If you open the site in Firefox for Android, no matter where the viewport is, it always shows zero. In earlier Versions of Firefox it had the same behavior like Firefox on PC and shows the correct Distance of the site window to the viewport borders.

LG,

Udo

more options

Thanks, Udo. It seems to behave very inconsistently. After I zoom into the page so some scrolling is needed, it may or may not show me new values as I move the rectangle around and tap. Seems sometimes the horizontal gets stuck on 0 until I do a little vertical scrolling, then it starts working. I don't know why it is behaving that way.