New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
de.m.wikipedia.org - Wrong scrolling behavior when opening sections #25995
Comments
I can't reproduce this on Firefox 67 on Android 8.0. |
I made a short video to clarify the behavior of this bug in Firefox 66.0b7: I also could not reproduce this bug in
on Android 7.0 |
Thanks for the report @Firionus and for the video, I was able to randomly reproduce it. Tested with: Moving to Needsdiagnosis for further investigation. |
On a pixel 2, with Android 9 and Firefox 67 on a fresh profile. I can't reproduce. never. whichever the initial position of the menu. @Firionus says it only happened on 66 and it seems to work on Firefox 67. I would be inclined to close as worksforme given it's working in recent version and will hit soon the beta. Or if someone is able to run a mozgression, at least we would know why. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue at https://webcompat.com/issues/new if you are experiencing a similar problem. |
@karlcow , I can still reproduce the issue on a clean profile on 2 different devices. Tested with: I'll reopen the issue for further investigation. |
On a pixel 2 device the screen is too long to be able to reproduce. because you can't put the menu on top. but even if I open a submenu first to make the page longer, and place the first menu item on top, I can't reproduce. So it's very hard to diagnose without being able to reproduce. Also if I try on RDM, all the menus are opened by default when simulating the pixel2 (411x731) and all the menus are collapsed when simulating the Galaxy S5 (360x640). And I can reproduce on RDM using the Galaxy S5 form factor. ok the way to reproduce on a pixel 2 is by putting the screen into landscape mode. So this is happening only if the menus are all collapsed at the start (small screen height) AND you can put the first menu at the top of the viewport. If the viewport is higher so the page bottom is visible without having the menu at the top, this is not working. Maybe that can give us a clue. The sections which are open have function mfTempOpenSection(id) {
var block = document.getElementById("mf-section-" + id);
block.className += " open-block";
block.previousSibling.className += " open-block";
} on <h2
class="in-block section-heading"
onclick="javascript:mfTempOpenSection(1)"
> but this is not activated when we click on the header:
function u(e, t, s) {
var r,
n,
a = l(s);
t.find('.section-heading span').each(function () {
n = t.find(this),
r = n.parents('.section-heading'),
a[s.title][n.attr('id')] && !r.hasClass('open-block') && e.toggle(r, s)
})
}
function p(e) {
var t = (new Date).getTime(),
s = l(e);
Object.keys(s).forEach(function (e) {
var r = s[e];
Object.keys(r).forEach(function (n) {
var a = r[n];
Math.floor((t - a) / 1000 / 60 / 60 / 24) >= 1 && delete s[e][n]
})
}),
h(s)
}
c.prototype.toggle = function (e) {
var t,
s = e.is('.open-block'),
n = e.data('page'),
a = e.next();
e.toggleClass('open-block'),
e.data('indicator').remove(),
i.rotation = s ? 0 : 180,
t = new o(i).prependTo(e),
e.data('indicator', t),
a.toggleClass('open-block').attr({
'aria-pressed': !s,
'aria-expanded': !s
}),
this.eventBus.emit('section-toggled', {
expanded: s,
page: n,
isReferenceSection: Boolean(a.attr('data-is-reference-section')),
$heading: e
}),
r.isWideScreen() || function (e, t) {
var s = e.find('span').attr('id'),
r = e.hasClass('open-block'),
n = l(t);
s && (r ? n[t.title][s] = (new Date).getTime() : delete n[t.title][s], h(n))
}(e, n)
},
c.prototype.reveal = function (e, t) {
var s,
r;
try {
(r = (s = t.find(a(e))).parents('.collapsible-heading')).length || (r = s.parents('.collapsible-block').prev('.collapsible-heading')),
r.length && !r.hasClass('open-block') && this.toggle(r),
r.length && window.scrollTo(0, s.offset().top)
} catch (e) {
}
}, When we click on the heading, this function is triggered. c.prototype.toggle = function (e) {
var t,
s = e.is('.open-block'),
n = e.data('page'),
a = e.next();
e.toggleClass('open-block'),
e.data('indicator').remove(),
i.rotation = s ? 0 : 180,
t = new o(i).prependTo(e),
e.data('indicator', t),
a.toggleClass('open-block').attr({
'aria-pressed': !s,
'aria-expanded': !s
}),
this.eventBus.emit('section-toggled', {
expanded: s,
page: n,
isReferenceSection: Boolean(a.attr('data-is-reference-section')),
$heading: e
}),
r.isWideScreen() || function (e, t) {
var s = e.find('span').attr('id'),
r = e.hasClass('open-block'),
n = l(t);
s && (r ? n[t.title][s] = (new Date).getTime() : delete n[t.title][s], h(n))
}(e, n)
}, and the repositioning happen when we hit the line. e.toggleClass('open-block'),
jQuery.fn.toggleClass = function (state) {
if (state !== undefined && typeof state !== 'boolean') {
return oldToggleClass.apply(this, arguments);
}
migrateWarn('jQuery.fn.toggleClass( boolean ) is deprecated');
return this.each(function () {
var className = this.getAttribute && this.getAttribute('class') || '';
if (className) {
jQuery.data(this, '__className__', className);
}
if (this.setAttribute) {
this.setAttribute('class', className || state === false ? '' : jQuery.data(this, '__className__') || '');
}
});
}; which does nothing much but changing the class. when .client-js .collapsible-block.open-block {
display: block;
} I tried to make a reduced test case, but I can't reproduce the behavior. I don't think this is related to the website code. And it's probably a bizarre behavior of Firefox. I will open a new bug on bugzilla. |
Close as duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1534863 |
URL: https://de.m.wikipedia.org/wiki/Organische_Halbleiter
Browser / Version: Firefox Mobile 66.0
Operating System: Android 7.0
Tested Another Browser: No
Problem type: Something else
Description: Wrong scrolling behavior when opening sections
Steps to Reproduce:
Browser Configuration
Console Messages:
From webcompat.com with ❤️
The text was updated successfully, but these errors were encountered: