Page MenuHomePhabricator

Page scrolls up by itself (due to Gadget-Stockphoto on Commons)
Closed, InvalidPublicBUG REPORT

Description

This bug is caused by load.php and only happens on Wikimedia Commons File: pages.

Steps to replicate the issue (include links if applicable):

What happens?:

  • After the page reloads, the entire page slowly scroll upwards for about 1.5s (video linked below)
  • If the page is repeatedly refreshed, it repeats scrolling upwards until eventually reaching the top

What should have happened instead?:

  • After the page reloads, it shouldn't move around

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Restricted Application added subscribers: Masumrezarock100, Aklapper. · View Herald Transcript
Aklapper changed the task status from Open to Stalled.Sep 18 2023, 8:55 AM
Aklapper removed a project: Commons.

My browser is Firefox 95.0 (most recent in my Software Manager).

That is not correct. http://packages.linuxmint.com/search.php?keyword=firefox lists firefox 117.0.1+linuxmint1+una for Linux Mint 20.2.

Does this problem also happen when you use Ctrl+R and put the mouse not close to the top, but way lower?

My browser is Firefox 95.0 (most recent in my Software Manager).

That is not correct. http://packages.linuxmint.com/search.php?keyword=firefox lists firefox 117.0.1+linuxmint1+una for Linux Mint 20.2.

Does this problem also happen when you use Ctrl+R and put the mouse not close to the top, but way lower?

  • Problem still persists after browser was updated to Firefox 117.0.1
  • Yes, it still happens when I put the mouse pointer near the bottom of the screen and refresh via Ctrl+R
  • New observation: the farther down the page I scroll (e.g. to the Licensing/File History sections) the less it scrolls the page after refresh.
  • Screen recording of new observation (all refreshes done via Ctrl+R): https://archive.org/download/c9sm3/wiki3.webm

Thanks for testing! Does it also happen with the mouse pointer near the bottom if you go to the address https://commons.wikimedia.org/wiki/File:Sponge-natural.jpg?safemode=true (note the safemode=true)?

With ?safemode=true in the URL, it no longer happens. The page no longer scrolls by itself (regardless where the mouse pointer is or how the page is refreshed).

In that case, this problem happens because of custom code that you load, either via gadgets or user scripts, or via browser add-ons or browser extensions.
See https://www.mediawiki.org/wiki/Help:Locating_broken_scripts .
(User scripts, gadgets, templates, custom CSS are local on-wiki content. Local content is managed independently on each wiki, by each wiki community themselves.
This would need fixing on the local wiki by editing its local content. Thus I am closing this task here - thanks for your understanding.)

Thank you. By disabling Wikimedia Gadgets one-by-one, I've discovered that Gadget-Stockphoto is what's causing the problem. It's one of the gadgets that's "Enabled by default for all". Unless there's a better place I should report the problem, I'll report it on the MediaWiki_talk:Gadget-Stockphoto.js

Aklapper renamed this task from Page scrolls up by itself: bug with js in load.php to Page scrolls up by itself (due to Gadget-Stockphoto on Commons).Sep 27 2023, 1:35 PM