Steps to replicate the issue (include links if applicable):
- Go to https://hoyodex.miraheze.org/wiki/Divine_Key?oldid=25151&safemode=1
- Try to select text directly above a heading, for example here:
What happens?:
The text of the heading is being selected, while the mouse cursor is over the text of the paragraph (the mouse cursor position is at the tip of the arrow in the screenshot).
What should have happened instead?:
The text of the paragraph should be selected instead.
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
MW: 1.43.1 (cde4276)
Refreshed: 4.0.8 (69f4d5a)
Other information (browser name/version, screenshots, etc.):
The paddingTop and marginTop properties are added to all headings by the following function:
https://github.com/wikimedia/mediawiki-skins-Refreshed/blob/264c1c631b2f52390bd7ff9ad856f0fed234de5d/refreshed/scripts/refreshed.js#L78-L90
This causes the "hitbox" of the headings to extend beyond their visible area:
This is only reproducible on MediaWiki 1.43 because the class for headings appears to have been renamed from mw-headline to mw-heading since, which causes the padding and margin to no longer be added.





