Page MenuHomePhabricator

DiscussionTools new topic button flickers on Firefox mobile
Open, Needs TriagePublicBUG REPORT

Description

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

What happens?:
The new topic button flickers.

What should have happened instead?:
Should show new topic button when scrolling up (or should not hide it at all).

Software version (skip for WMF-hosted wikis like Wikipedia):
This seems recent. Last two weeks?

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

110.0.1 (Build #2015933339), 43c570380+
AC: 110.0.1, 22ee42db12
GV: 110.0-20230213213738
AS: 96.2.1

Event Timeline

Esanders subscribed.

I can't reproduce using the same FF build on mobile, or on desktop.

Tacsipacsi renamed this task from discussion response button flickers on Firefox mobile to DiscussionTools new topic button flickers on Firefox mobile.Feb 23 2023, 3:27 PM
Tacsipacsi updated the task description. (Show Details)
Tacsipacsi subscribed.

I can’t reproduce it either. Did you touch the screen when it flickered? Maybe your hand trembled, which was detected as many scrolls up (= show the button) and scrolls down (=hide the button). (By the way, it’s the new topic button, not the reply button. I was confused about what you meant before I watched the video.)

I does appear to be flickering very fast while the scroll isn't changing. I suspect some edge case rendering bug, maybe with non-integer scroll offsets. I tried changing the zoom level but still could not reproduce.

Here is a video with touch visibility enabled:
https://youtube.com/shorts/CzaVHHAsFpE?feature=share3

The videos are a bit misleading. During filming it flickers much more. It flickers so fast it appears semitransparent otherwise.

I can repeater this on Firefox nightly, without Auth. I can also repeat in private mode. This is on Samsung a52s.

Here is a video with touch visibility enabled:
https://youtube.com/shorts/CzaVHHAsFpE?feature=share3

It’s private, please make it public or unlisted (or something like that, I’m not sure about the YouTube terminology).

Done. I see recompressing on YT makes it even weirder. You have to imagine it flickers faster. Much faster. The flickering is always when I scroll up. Not touching the screen is not changing anything (still flickers).

I cannot reproduce on my old Moto G5 Plus.

I caught the moment when the new topic bar is hidden:

obraz.png (884×1 px, 160 KB)

On desktop I can reproduce by changing bottom: -1px to bottom: 0.

Seems to be risky to use padding without box-sizing. Mixing em with px also might be problematic.

Thank you for filing this issue, @Nux.

Before prioritizing work on fixing this, we're going to see whether other people (specifically, people using browsers other than Firefox) people in experience a similar issue.


For context, ~0.7% of people use Firefox to edit on mobile devices:

Screenshot 2023-03-09 at 8.40.05 AM.png (890×912 px, 132 KB)

Hardly a fair fight on Android with all those open-in-app modes and other stuff...

So I guess whatever. If anyone wants a fix then this seems to do the trick:
https://meta.wikimedia.org/w/index.php?title=User:Nux/global.css&oldid=24707697#L-15

I saw this today on a Wiktionary discussion page. So I set a breakpoint on attribute modification. It gets hit on line 102 of mobile.js:

			var observer = new IntersectionObserver(
				function ( entries ) {
					$newTopicWrapper.toggleClass( 'ext-discussiontools-init-new-topic-pinned', entries[ 0 ].intersectionRatio === 1 ); // <-- here
				},
				{ threshold: [ 1 ] }
			);

This line of code is both adding and removing the class. Adding the class triggers removal and vice versa.