Page MenuHomePhabricator

Unpining menus jumps to top
Open, Stalled, Needs TriagePublicBUG REPORT

Description

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

  • Scroll to down parts of long page
  • Click "Hide" on right or left (TOC) menu

What happens?:

Reading is broken: page jumps to top to display where are buttons to restore sidebars, with popups with messages *unpinned-popup. The return to top breaks reading at place, where I stopped and I need to scroll again to the place where I break reading when I decided to hide sidebars.

What should have happened instead?:
There should be other form to notify me about buttons to open menus. This should not scroll the page. Maybe this is because of "sticky header" broken (is this enabled on WMF?).

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
Firefox, different versions and screens. It happens for long time.

Event Timeline

Change #1309850 had a related patch set uploaded (by Anirudh_K; author: Anirudh_K):

[mediawiki/skins/Vector@master] Fix pinnableElement: Prevent page scroll when unpinning

https://gerrit.wikimedia.org/r/1309850

Anirudh_KK added a project: RoadToWiki.
Anirudh_KK subscribed.

I've submitted a patch for this : https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/1309850

The issue was caused by the browser's default behavior when focus() is called on the toggle button after unpinning the menu. Passing { preventScroll: true } to the focus method prevents the page from abruptly jumping back to the top. I also added a manual scroll restoration fallback just to be safe for older Safari versions. Let me know if it needs any changes!

Jdlrobson-WMF subscribed.

I can't replicate this on my MacBook in Chrome for table of contents. Note the jump to top for tools is intentional so that the user sees where it has moved to.

  • What browser?
  • Are you logged out?
  • Do you have any gadgets that might be interfering? safemode=1
  • Could you share a URL where you are seeing this issue?

It is on Firefox.

Note the jump to top for tools is intentional so that the user sees where it has moved to.

So, you can reproduce it.

Yes, this may be intentional and I understand the reason. But it distracts from reading.

Jdlrobson-WMF changed the task status from Open to Stalled.Fri, Aug 7, 2:10 PM

It is on Firefox.

Note the jump to top for tools is intentional so that the user sees where it has moved to.

So, you can reproduce it.

Yes, this may be intentional and I understand the reason. But it distracts from reading.

The description you wrote refers to the table of contents (TOC) on the left hand side. If that's happening it's a bug, but I cannot reproduce this on that feature. The bug should not impact table of contents because that specifically is a reading feature.

The tools menu appears on the right in LTR languages and is working as expected.

Please clarify if you are talking by editing your description whether you are referring to tools or table of contents or both.