Page MenuHomePhabricator

autofocus bug with MW Page Forms popups
Closed, DeclinedPublicBUG REPORT

Description

Environment:

  1. Metrolook 7.0 alpha 2 (48c1b49)
  2. MediaWiki 1.34.1 (3bdc458)
  3. Page Forms Page Forms 4.8
  4. ref: https://emw-meza.site/fbtest/Special:Version

Issue Description:
Metrolook CSS causes problematic autofocus issue when using Page Forms #formlink popup feature. I have set-up a live example of this problematic behavior at:

https://emw-meza.site/fbtest/Metrolook_PF_Popup_Issue

Steps to Reproduce:

  1. visit: https://emw-meza.site/fbtest/Metrolook_PF_Popup_Issue
  2. click the formlink
  3. scroll to the bottom of the form
  4. click the textarea form field
  5. observe that Metrolook CSS automatically moves the focus to the top of the page
  6. scroll down again repeat 3-5 as often as you'd like

Expected Results:
It is expected that clicking the form fields would keep the focus on where the cursor is.

Event Timeline

Even if it is the determination of the Metrolook developers that this is a Page Forms issue, I would be grateful for any simple ways to halt this behavior, even if it is kinda hackish. Thanks!

I believe I have isolated the behavior to the following JS code in Metrolook:

mediawiki/skins/Metrolook/js/fixed-header-scroll-fix.js

It would appear that this "fixed header scroll" is not handling the popup iframe of Page Forms.

@Revansx: Hi, could you explain what's the reason for (re)assigning the task? Did Paladox and/or Immewnity explicitly agree to work on this?

I just thought that is was appropriate to assign them. My apologies if that was bad protocol. I thought it was the right thing to do. Was it?

Immewnity subscribed.

The listed script is one that I didn't have in the initial version of the skin (the one in use on PidgiWiki), and I have not followed the changes Paladox has made. Apologies.

I understand. Do you have any thoughts on how I might debug it? Any idea what could cause a page to scroll to the top no matter where you click it? Any insights or things to try would be greatly appreciated. I'd hate to have to disable Metrolook due to something so (presumably) simple for someone versed in responsive design.

I just thought that is was appropriate to assign them. My apologies if that was bad protocol. I thought it was the right thing to do. Was it?

@Revansx: Ah, thanks! Please avoid. :) See https://www.mediawiki.org/wiki/How_to_report_a_bug

Is there anyone who is willing give me some advice on how to debug/resolve this myself?

Is there anyone who is willing give me some advice on how to debug/resolve this myself?

@Revansx: I'd start with fixing the fatal exception on that website (which might or might not be related).
See the console of your browser's developer tools and https://www.mediawiki.org/wiki/Manual:How_to_debug

@Revansx: Is this still a problem? Asking as https://emw-meza.site/fbtest/Metrolook_PF_Popup_Issue says "You do not have permission to edit this page, for the following reason: The action you have requested is limited to users in the group: Users." and as https://emw-meza.site/fbtest/index.php?title=Special:CreateAccount fails with "The supplied credentials could not be used for account creation." after not asking me for a password at all before. Hence cannot test anything.

Unfortunately closing this Phabricator task as no further information has been provided.

@Revansx: After you have provided the information asked for and if this still happens, please set the status of this task back to "Open" via the Add Action...Change Status dropdown. Thanks!