Page MenuHomePhabricator

Top of page restricts gadgets' scroll area
Closed, InvalidPublicBUG REPORT

Description

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

What happens?:

  • The top of the list is unavailable. We can only choose categories from the bottom of the list.

What should have happened instead?:

The purple circled area is where the bug happens... well we just can't get to see the top of the list.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

You might say "Don't bother us with a bug in a gadget."

But in fact I think the gadget is a victim of a bug in MediaWiki!

It is just doing its thing within a MediaWiki box that cuts it off.

And as we are at the top of the page, there is no room left...

See also https://commons.wikimedia.org/wiki/MediaWiki_talk:Gadget-HotCat.js#c-Jidanni-20240107074900-Can't_scroll_list_if_bangs_into_top

m.jpg (349×948 px, 79 KB)

Event Timeline

Pols12 subscribed.

The reproduction also needs Vector-2022 skin enabled with sticky header, along with “Place categories above all other content.” gadget enabled too.
Firefox well opens the select downward: no issue. I don’t see interest to opening the select upward, so I would turn

if ( textPos.y < maxListHeight + offset + 1 ) {
	// The list might extend beyond the upper border of the page. Let's avoid that by placing it
	// below the input text field.
	nt = this.text.offsetHeight + offset + 1;
	if ( this.engineName ) this.engineSelector.style.top = this.text.offsetHeight + 'px';
} else {
	nt = -listh - offset - 1;
	if ( this.engineName ) this.engineSelector.style.top = -( offset + 1 ) + 'px';
}

into

// The list might extend beyond the upper border of the page. Let's avoid that by placing it below the input text field.
nt = this.text.offsetHeight + offset + 1;
if ( this.engineName ) this.engineSelector.style.top = this.text.offsetHeight + 'px';

I close this ticket, because HotCat gadget is not supported through Phabricator.