iOS 11.3 upgrade breaks the mobile message slider

(ljpp) #1

It’s happening again, like in Twin Peaks. Upgrading to iOS 11.3 will break the mobile view message slider.

Reproduced here and on our own instances.

Massive UX problem. Workaround proposals highly appreciated.

(Joffrey Jaffeux) #2

At first glance it seems like it’s constantly switching event target from scrollbar to background back and forth. Im not familiar with this code but maybe we could make it more resilient with an enclosing div which would stop event propagation.

(Régis Hanol) #4

I’ll have a look. I changed the scrolling code so this could be my fault.

(ljpp) #5

We are on stable branch, so code has not changed recently. It worked flawlessly before the 11.3 update - I tested this before and after.

(ljpp) #6

This goes way beyond my mad skillz. Is there anything we can try on Discourse customazion level to work this around?

Our topics are generally very long, often 1000+ posts. This is really painful for iOS users.

(Sam Saffron) #7

It’s assigned to @zogstrip and on his list, we will get it sorted, super easy repro on meta


@zogstrip Any update on this? I’ve been having this issue as well, and it makes it very difficult to navigate within a topic.

(Régis Hanol) #9

Will see if I can fix it today.

(Sam Saffron) #10

I just fixed this, but it took me three shots 1, 2, 3

To fix this I made sure our touchmove event is bound with capture: true, passive: false prior to binding touchstart. The order of binding events matters cause if you bind touchstart and only after bind touchmove during the touchstart event, the move event is not capture right.

So… the glitch in iOS in English is:

If you bind touchmove with capture: true, passive: false on document, right after touchstart. The passive: false will only take effect AFTER the next touchstart hits… phew … that is mouthful, but that is the Apple bug.

So yeah, this is nasty bug in iOS. That said, jQuery does not support passive: false so we were already stuck bypassing it here.

Anyway… time to rejoice cause this is fixed but it was really really extra annoying!

:relieved: :lion:

Discourse 2.0.0.beta8 Release Notes
(ljpp) #11


  • This is a strong candidate to Stable. Basic functionality broken.
  • If not, then can we patch this on Customization level?

(Pls. dont close the topic too early)

(Sam Saffron) #12

Technically … probably … but it very hairy.

As to backporting to stable, I don’t know @codinghorror’s call.

(Régis Hanol) #13

I guess it depends on how easy this is. If there’s no merge conflict, I don’t see why we wouldn’t?

(Sam Saffron) #14

I think it merges cleanly, feel free to give it a shot, there are 3 commits

(Régis Hanol) #15

@ljpp I backported the fix to both beta and stable branches.

(ljpp) #16

Awesome - many thanks. I’ll report back once upgraded.

(ljpp) #17

Upgrading and performing other maintenance while at it. 43 minutes of topic life time to go. @staff should be more flexible in closing bug threads…

Edit: System upgraded to 1.9.3+3 and the fix seems to tackle the scrolling issue (on my personal device).

Great work and kudos to @sam & @zogstrip

(Sam Saffron) #18

This topic was automatically closed after 25 hours. New replies are no longer allowed.