iOS 15 Safari woes

My iPhone 12 isn’t pro or max (though my other phone is a Vertu), but otherwise same here. The steps to reproduce are:

  • on any BBS post:
  • long-tap text to highlight
  • iOS context menu appears, but no Quote button:

I can’t repro

Looking at your screenshot, I wondered if it was something to do with accessibility options, since you don’t have “speak selection” enabled, and there aren’t all that many things that could be different. But turning off all my non-default options (AFAIK) doesn’t help.

It’s hard to tell much from Safari’s Web Inspector, but I can see how the page on my phone differs from the desktop version. On the desktop, the button container (div.quote-button#ember185) seems to always have an explicit position set via the style attribute, and it gains and loses the class visible according to whether it is showing or not. On my phone, that div has no position set, and its class doesn’t change when I select text. Which probably doesn’t help, except to say it’s not just displaying the button in the wrong place.

I can’t reproduce your issue either but could it be because the quote button is shown outside the viewport? :thinking:

In order to ensure the user can click the quote button, we have to put it outside the “touch area” of the selection (so user can click on the selection handles), otherwise iOS will “swallow” the click event.

1 Like

I don’t think it’s that – I can see that the Quote button has display:none set even after I select text (see above)…

1 Like

Well, there’s a new iOS update… roll the :game_die: and see where it takes us?

Sadly, no change with iOS 15.4. I remembered about the Discourse Hub app, though, and quoting does work there. What’s the difference between Safari and the web view in the app?

(ETA not cookies or local storage, apparently, as I just deleted them for bbs.boingboing.net, and that didn’t help either)

ETFA from poking around further, I see the Quote button depends on the document selectionchange event. Turns out, on my phone, that event never fires on any page. If I run

  document.addEventListener("selectionchange",
    ()=>{console.log("I choo-choo-select you")}
  )

– even on a plain HTML page – nothing shows up in the console when I select text. On my iPad it works as expected, and so does the Quote button.

So the good news is it’s not a Discourse bug. The bad news is, the chance of Apple ever fixing a me-specific Safari bug is less than zero, which is yet another blow to my dream of not turning into Ted Kaczynski sooner or later.

2 Likes

There should be none.

Yet, it works when using the Discourse Hub app on your phone? :thinking:

1 Like

Except for extensions, so I tried turning those off again, and I guess I didn’t turn them off hard enough before, because that was the problem after all. What I regret most is the stain of shame I have brought upon my family.

(It was the StopTheMadness extension, specifically its “protect contextual menus” option).

3 Likes

Oh nice find. Didn’t know Safari mobile supported extensions :sweat_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.