iOS Markdown composer/editor freezes when selecting text a second time

I am experiencing a reproducible text-selection problem in the Discourse Markdown composer on iOS.

This is separate from the /upcoming-events issue I reported previously. I first noticed this composer behaviour after earlier rebuilds, and it has persisted across my two most recent rebuilds.

Versions tested

  • v2026.7.0-latest +188
  • v2026.7.0-latest +195

At the time of testing, +196 was available, but the only additional commit appeared unrelated to the composer.

Steps to reproduce

  1. Open a new-topic or reply composer in Markdown mode.
  2. Enter or paste several lines of text.
  3. Long-press and select some text.
  4. The first selection works normally.
  5. Tap elsewhere to clear the selection.
  6. Long-press the text again and attempt to make another selection.

Expected result

The iOS text-selection menu and handles should appear normally each time, including the option to Select All where applicable.

Actual result

Selection works when the composer is first opened.

After clearing that first selection, attempting to select text again causes the composer or text-selection interface to become unresponsive. I can no longer reliably select text, move the selection handles, or use Select All.

Testing already completed

  • Reproduces on v2026.7.0-latest +188
  • Still reproduces after rebuilding to v2026.7.0-latest +195
  • Reproduces in Discourse safe mode
  • Broken or obsolete theme components were removed before retesting
  • The first selection consistently works; the problem begins after deselecting and trying to select again

Environment

  • Client: iOS
  • Interface: installed PWA or Safari
  • Composer: Markdown mode
  • Discourse safe mode: reproduces
  • Discourse version currently installed: v2026.7.0-latest +195

I can provide the iOS version, device model and a screen recording if useful.

Hi @Ethsim2

I believe this is related to a change I made last week trying to mitigate some of the UI quirks that come along with WebKit and iOS, particularly iPad.

I’m off today and will look into this first thing on Monday. It would be helpful to know which device model you were on.

Thanks - I’m testing on an iPhone 16 Pro (model MYNQ3QN/A) running iOS 26.5.

I can reproduce it in both:

  • the installed Discourse PWA
  • Safari

The behaviour is the same in each case: the first text selection works, but after dismissing it, a second attempt to change length of selection causes the selection interface to become unresponsive.

I can also provide a screen recording if that would help.