为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

last 2 Firefox updates have each broken some of my scripts

  • 2 个回答
  • 0 人有此问题
  • 2 次查看
  • 最后回复者为 csuflinux

more options

After making a jump to FF 105, my virtual bookmark function started landing on different places each time I invoked it, even though I wasn't changing the window.pageYOffset value. Now after updating to FF 106, where I had the option of setting that value using the onLoad option, the page remains absolutely blank until I confirm or reject the window.pageYOffset value. Since I cannot see where on the page I am positioned (because it won't finish loading) it is now useless. This tool had been my most frequently used function for many years as I could reposition to a desired location by merely pressing my home key. OnKeydown it would jump to the top of the page and onKeyUp, it would return me to virtual bookmarked position, no matter where I was on the page. For some of my pages, I would invoke it more than once in less than a minute. It was really useful!. (Now it is useless!) These problems happened immediately after each FF update.

 /russ
After making a jump to FF 105, my virtual bookmark function started landing on different places each time I invoked it, even though I wasn't changing the window.pageYOffset value. Now after updating to FF 106, where I had the option of setting that value using the onLoad option, the page remains absolutely blank until I confirm or reject the window.pageYOffset value. Since I cannot see where on the page I am positioned (because it won't finish loading) it is now useless. This tool had been my most frequently used function for many years as I could reposition to a desired location by merely pressing my home key. OnKeydown it would jump to the top of the page and onKeyUp, it would return me to virtual bookmarked position, no matter where I was on the page. For some of my pages, I would invoke it more than once in less than a minute. It was really useful!. (Now it is useless!) These problems happened immediately after each FF update. /russ

所有回复 (2)

more options

Hi Russ, for what it's worth, I don't see any compatibility notes on https://developer.mozilla.org/docs/Web/API/Window/pageYOffset so if there was a change, it probably was not intentional.

Is there a test page demonstrating the problem somewhere (that doesn't require a login)?

When sharing a link to a non-Mozilla site, you can put a space before the top level domain to bypass the spam link moderation queue:

https://www.example .com/somepath

more options

I apologize to the community for having specified what are very likely two different issues in one post. (I suppose it is too late to split them apart, but I am willing to do that if someone can advise me how to go about it.) I appreciate your checking page.YOffset. I didn't think it was deprecated, but I hadn't confirmed it. (I didn't know where to research that.) I developed a homegrown script that uses the page offset (issue #1) I use as a tool, not just on my pages (which are offline now), but on any page where I want to place virtual bookmark. It is pretty much a simple "bookmarklet" piece of code I employ when I see something I may want to either frequently return to or relocate a "needle I found in a haystack" of text. Each time I press my designated "return to bookmark" offset key, it seems to go to different offsets that are in the vicinity of where I want to go, but are somewhat inconsistent. The offset is established thusly:

       if(window.pageYOffset) vertPosit = window.pageYOffset;
       else if(document.body.scrollTop) vertPosit = document.body.scrollTop;
       else {
           alert('Unable to determine offset for this browser');

On some of my own pages that are date or time sensitive, the tool is invoked using the HTML BODY onLoad option which is now having the before described (issue #2) of not being able to see whether I should or should not confirm the script. Note: these issues appeared at different update release levels; 105 then 106. As this may not have a quick or simple resolution, I am willing to take this process offline and later return the solution to the community once it is resolved.

 /russ