Page MenuHomePhabricator

Ref square ve-ce-focusableNode-highlight is duplicated on Firefox, sometimes much above
Open, Needs TriagePublicBUG REPORT

Description

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

What happens?:

Notice the square .ve-ce-focusableNode-highlight is duplicated: once well over the ref number, but also another one:

  • usually overlapping the first one, but with a slightly different shape
  • for 16th ref, it is located about 60px above.

What should have happened instead?:

There should be only one square, well located, as it is with Chromium.

Other information:
Firefox 115.
I think this is a several-months regression (early 2023?).

Event Timeline

I can't reproduce, can you upload a screenshot?

Hmm, no idea what that is. It seems that there's some (invisible) content inside the reference at that position, and the editor faithfully highlights it. It could be something added to the markup of references by a gadget, maybe?

Pols12 added a subscriber: thiemowmde.

It is actually <span class="mw-reflink-text">[14]</span> which is display:none in default Cite style sheet.
It is followed by an ::after pseudoelement.

ext.cite.parsoid.styles.css:

/* Without a group */
.mw-ref a::after {
	content: '[' counter( mw-Ref, decimal ) ']';
}

/* Hide the default rendering in browsers that support content
 * generation by selecting for :after pseudo-element. */
/* stylelint-disable-next-line selector-type-no-unknown */
x-thereisnoelementwiththisname::after,
span.mw-reflink-text {
	display: none;
}

However, ve.ce.MWReferenceNode.less overrides it with the following, which has been fixed with 4ac067c0faf6 by @thiemowmde (T334595). The patch date matches with my regression status conjecture.

.ve-ce-mwReferenceNode span.mw-reflink-text {
	color:transparent;
	position:absolute;
	display:inline
}

However, that does not explain why the absolute position for 16th ref in sample page is wrong with Firefox.