The issue of drag-and-select not working in the composer on iPad (Safari and DiscourseHub) was reported by Jagster, who noted it occurs frequently but returns to normal when there are at least two chapters. pmusaraj identified the root cause: a JavaScript fix to prevent unintended scrolling during touch events on short text areas inadvertently blocked text selection. This was resolved by merging a fix in a pull request https://github.com/discourse/discourse/pull/30957. Jagster confirmed the issue is now resolved.
iPad (Safari and DiscourseHub) and some days now I can’t select text in the composer. I can double click but I can’t drag selection any wider.
And there is more, of course. It isn’t bother every time, but the most of time yes. And it looks like drag&select comes to back normal when I have at least two chapters.
Great report, thanks @Jagster. This bit was very helpful:
When you perform a touch action on an element that doesn’t scroll, the browser (Safari in this case) propagates that event to the parent elements. In the composer, that means it propagates it back up to the body and then scrolls that body. Even though a) the body isn’t visible and b) the editor is in a fixed-positioned element, which usually doesn’t warrant scrolling the body.
So, to fix for this issue, we added some logic in JS that stops the touchmove event from doing its thing while the textarea is short. But inadvertently, that causes issues with text selection.