Page MenuHomePhabricator

[Regression] Clicking "add unknown parameter" causes scroll, fails to expand
Closed, ResolvedPublic3 Estimated Story Points

Description

Confirmed broken on Firefox and Chromium, linux.

Given a template transclusion with more than one page of parameters,
and with the add parameter button visible but collapsed,
When scrolling to the bottom and clicking to expand "add undocumented parameter",
Then the section doesn't expand, and scroll offset is reverted to the top of the document.

add-unknown-scroll.gif (720×1 px, 1 MB)

Event Timeline

thiemowmde set the point value for this task to 3.Oct 7 2021, 11:47 AM
thiemowmde added a subscriber: thiemowmde.

I could finally reproduce it. It appears like this happens only once directly after the dialog loaded.

Looks like the first click in the content pane sets off a flurry of UI events, which then trigger model changes, which in turn cause more UI feedback. I believe both of these control flows are a problem, but the issues are too big to fix for just this bug. We might just try to circumvent one of the event flows, or even explicitly scroll to the input field.

console.trace() scrollIntoView Element.js:759:4
    scrollIntoView Element.js:759
    scrollElementIntoView Element.js:1081
    onStackLayoutSet BookletLayout.js:206
    emit oojs.js:901
    setItem StackLayout.js:254
    setPage BookletLayout.js:570
    onStackLayoutFocus BookletLayout.js:170
    jQuery 5
console.trace() scrollIntoView Element.js:759:4
    scrollIntoView Element.js:759
    scrollElementIntoView Element.js:1081
    onSelectedTransclusionPartChanged ve.ui.MWTemplateDialog.js:651
    emit oojs.js:901
    setSelectionByPageName ve.ui.MWTransclusionOutlineWidget.js:180
    onBookletLayoutSetPage ve.ui.MWTransclusionDialog.js:229
    emit oojs.js:901
    setPage BookletLayout.js:580
    onStackLayoutFocus BookletLayout.js:170
    jQuery 5

Change 727335 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/VisualEditor@master] Fix first click on parameter page causing bad scroll

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

Change 727335 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fix first click on parameter page causing bad scroll

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