Page MenuHomePhabricator

Highlighting of the replies is incorrect on Beta cluster
Closed, ResolvedPublic

Description

The highlight for the newly added replies on Beta cluster seems to be appearing in an incorrect position.

Event Timeline

For me, it doesn’t highlight at all (FF 68.3 ESR on Debian). I see

TypeError: range.cloneRange is not a function

caused by the

RangeFix.getBoundingClientRect( $pageContainer[ 0 ] )

added as controller.js’s line 133 in a6147ff. I’m not very surprised, as [[https://github.com/edg2s/rangefix/blob/f8b143cedd259250af4ee1938a300bc92f0449bb/rangefix.js#L208|RangeFix.getBoundingClientRect]] expects a Range parameter, not an HTMLElement one ($pageContainer is initialized—through various function calls—as $('#mw-content-text')). How much I love JavaScript’s complete lack of static typing…

For me, it doesn’t highlight at all (FF 68.3 ESR on Debian). I see

TypeError: range.cloneRange is not a function

Thanks, I've fixed that in https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/DiscussionTools/+/565047/, but it seems unrelated to this bug.

The issue here is that the highlight is positioned relative to .mw-parser-output, but that is not position:relative.

Change 565050 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Attach highlights to positioned container

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

Change 565050 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Attach highlights to positioned container

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