mirror of
https://github.com/ish-app/ish.git
synced 2026-05-28 21:10:35 +00:00
87f7b1d8a6
Selection.rangeCount can return 1 when there is no selection, it is enough for a selection to have been present in the past or for the user to have clicked on the page. See MDN: https://developer.mozilla.org/en-US/docs/Web/API/Selection/rangeCount Use Selection.isCollapsed to be entirely sure there is a selection before ignoring the click. This change fixes the issue ish-app/ish#2519, where focus to the terminal is lost and can not be regained, forcing the user to restart ish. Tested on iPad Pro 13-inch (M4) with iPadOS 26 Beta 2 and Stage Manager. Signed-off-by: Elvira Khabirova <lineprinter0@gmail.com>