Page MenuHomePhabricator

Variant C/D: autoscroll on Variant D
Closed, ResolvedPublic

Description

I just created a new account in ptwiki with Variant D (via the query string parameter). When I went to my homepage, it autoscrolled me down to this spot, instead of leaving me at the top of the page. I'm using Chrome.

image.png (839×1 px, 207 KB)

Event Timeline

@Etonkovidova -- can you see if you can reproduce this?

@Etonkovidova -- can you see if you can reproduce this?

I tested for Chrome - the autoscroll is present (not too significant though), and I got exactly the same screen as in the screenshot in the issue description.

Firefox does not have this issue.

@kostajh @Catrope @Tgr -- @Etonkovidova and I both experienced this, and I consider it is a priority to backport next week or to ride next week's train.

I don't see this. Do you have exact steps to reproduce?

@Tgr -- the steps I used most recently are:

  1. Use Chrome on desktop.
  2. Create a new Variant D account (this happens whether I use the query parameter or if I just happen to get Variant D).
  3. Skip the Welcome Survey.
  4. Click my username in personal tools to go to my homepage.
  5. It immediately scrolls down upon arrival.

Here is a gif from just now: https://drive.google.com/file/d/1R9xFSOu0GrK_rUgBk5uL2M37ZAOB-6Ql/view?usp=sharing

Change 635099 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/GrowthExperiments@master] StartEditingDialog: Prevent scrolling in non-modal mode

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

I was able to reproduce this by making my window short enough that the bottom of the suggested edits onboarding was out of view. I tracked down the issue by running $(window).on( 'scroll', function () { debugger; } ); during load and inspecting the call stack. It turns out that OO.ui.Window.prototype.ready calls this.$content.trigger( 'focus' ), which causes Chrome (but not Firefox) to scroll down so that it's centered.

OOUI needs some upstream fixes to make the focus behavior make sense for non-modal dialogs, but for now I'll submit a hacky fix for this.

Change 635116 had a related patch set uploaded (by Catrope; owner: Catrope):
[oojs/ui@master] Window: Don't manage focus for non-modal windows

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

Change 635099 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] StartEditingDialog: Prevent scrolling in non-modal mode

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

Change 635330 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/GrowthExperiments@wmf/1.36.0-wmf.13] StartEditingDialog: Prevent scrolling in non-modal mode

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

Change 635330 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@wmf/1.36.0-wmf.13] StartEditingDialog: Prevent scrolling in non-modal mode

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

Mentioned in SAL (#wikimedia-operations) [2020-10-21T23:14:55Z] <catrope@deploy1001> Synchronized php-1.36.0-wmf.13/extensions/GrowthExperiments/: T265751 T265754 (duration: 01m 08s)

Change 635116 abandoned by Esanders:

[oojs/ui@master] Window: Don't manage focus for non-modal windows

Reason:

Superseded by I7aa5f8c7b3 & Ib71d1f13b0a

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