Repository navigation
[iOS] Caret: no caret after a quick tap on another thought on iOS 27 #6059
Description
Seen in Safari on iOS 27.0.1. The same steps on iPadOS 18 lose the tap entirely, tracked in #6058.
- Hello beautiful people in the world
- Two
- Three
Steps to Reproduce
- Tap between
peopleandininHello beautiful people in the world. - Tap between
peopleandinagain. - Within about 300 ms of step 2, tap the middle of
Three.
Current Behavior
The cursor moves to Three and the keyboard stays open, but no caret is shown. Sometimes the caret appears briefly where Three was tapped and then disappears. Typing on the keyboard inserts text into no thought, and leaves the hidden editable em keeps for asynchronous focus unchanged. Both attempts in the debug log below do this (#48 and #80). After the first, the next tap finds the selection at the start of Three (#60), though em placed it at offset 5 (#51).
Expected Behavior
In this case
After step 3, a caret should be visible in Three, where it was tapped, and typing should insert text there.
In general
A tap on another thought should show a caret that typing goes into where it was tapped, however soon it follows a tap in the thought being edited.
Notes
- [iOS] Caret: a tap after a double tap puts the caret at the start of the tapped thought on iOS 27 #5963 ends in a similar state, with the caret at the start of the tapped thought on iOS 27, but after a double tap.
Debug Log
iOS 27.0.1, Safari (excerpt)
--- device: iPhone (web), 390x844, touch
--- userAgent: Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/27.0.1 Mobile/15E148 Safari/604.1
--- version: 351.2.0
--- commit: b37927619a
--- display: browser, portrait-primary, dpr 3, scale 1, safe-area-bottom 0
--- date: 2026-10-19
16:19:38.397 +1235ms #22 touchstart {"x":227,"y":107}
16:19:38.444 +8ms #24 action setCursor {"cursorHistoryClear":true,"preserveMulticursor":true,"offset":null,"path":["b6090e4877"]}
16:19:38.459 +15ms #25 touchend {"x":227,"y":107,"moves":0}
16:19:39.685 +1073ms #30 touchstart {"x":235,"y":100}
16:19:39.737 +1ms #32 touchend {"x":235,"y":100,"moves":0}
16:19:39.745 +8ms #33 focus {"tag":"DIV","testid":null,"label":"editable-b6090e4877","contenteditable":"true"}
16:19:39.749 +4ms #34 action setCursor {"cursorHistoryClear":true,"preserveMulticursor":true,"isKeyboardOpen":true,"offset":null,"path":["b6090e4877"]}
16:19:39.752 +2ms #35 action setCursor {"path":["b6090e4877"],"offset":22,"preserveMulticursor":false}
16:19:39.758 +7ms #36 tap {"eventType":"click","cancelable":true,"touching":false,"editingOrOnCursor":true,"isVisible":true,"longPress":"Inactive","touchMoved":false,"isKeyboardOpen":true,"noteFocus":false,"cursorOffset":22,"activeElement":"editable-b6090e4877"}
16:19:40.290 +526ms #39 viewport {"reason":"resize","innerWidth":390,"innerHeight":699,"clientHeight":699,"visualViewportWidth":390,"visualViewportHeight":369,"visualViewportScale":1,"visualViewportOffsetTop":0,"scrollY":0,"isKeyboardOpen":true}
16:19:41.169 +695ms #42 touchstart {"x":227,"y":93}
16:19:41.194 +25ms #43 touchCaret {"x":238,"y":93,"height":20,"editableLeft":72,"editableTop":87,"editableRight":337,"editableBottom":117}
16:19:41.244 +1ms #45 touchend {"x":227,"y":93,"moves":0}
16:19:41.484 +225ms #48 touchstart {"x":102,"y":171}
16:19:41.485 +1ms #49 touchCaret {"x":238,"y":93,"height":20,"editableLeft":72,"editableTop":87,"editableRight":337,"editableBottom":117}
16:19:41.536 +51ms #50 action setCursor {"path":["3c2a3a866a"],"offset":5,"cursorHistoryClear":true,"isKeyboardOpen":true,"preserveMulticursor":true}
16:19:41.547 +12ms #51 caret {"thoughtId":"3c2a3a866a","offset":5,"asyncFocus":false,"transient":false,"hidden":false}
16:19:41.548 +1ms #52 blur {"tag":"BODY","testid":null,"label":null,"contenteditable":null,"relatedTarget":{"tag":"DIV","testid":null,"label":"editable-3c2a3a866a","contenteditable":"true"}}
16:19:41.549 +1ms #53 focus {"tag":"DIV","testid":null,"label":"editable-3c2a3a866a","contenteditable":"true"}
16:19:41.552 +3ms #54 touchend {"x":102,"y":171,"moves":0}
16:19:51.872 +9992ms #59 touchstart {"x":234,"y":100}
16:19:51.892 +19ms #60 touchCaret {"x":77,"y":154,"height":20,"editableLeft":72,"editableTop":148,"editableRight":134,"editableBottom":178}
16:19:51.923 +1ms #62 touchend {"x":234,"y":100,"moves":0}
16:19:51.927 +5ms #63 blur {"tag":"BODY","testid":null,"label":null,"contenteditable":null,"relatedTarget":{"tag":"DIV","testid":null,"label":"editable-b6090e4877","contenteditable":"true"}}
16:19:51.928 +0ms #64 focus {"tag":"DIV","testid":null,"label":"editable-b6090e4877","contenteditable":"true"}
16:19:51.936 +4ms #66 action setCursor {"path":["b6090e4877"],"offset":22,"preserveMulticursor":false}
16:19:53.427 +1236ms #72 touchstart {"x":252,"y":100}
16:19:53.451 +24ms #73 touchCaret {"x":233,"y":94,"height":20,"editableLeft":72,"editableTop":88,"editableRight":337,"editableBottom":118}
16:19:53.476 +1ms #75 touchend {"x":252,"y":100,"moves":0}
16:19:53.526 +37ms #78 action setCursor {"path":["b6090e4877"],"offset":25,"preserveMulticursor":false}
16:19:53.735 +209ms #80 touchstart {"x":111,"y":168}
16:19:53.736 +1ms #81 touchCaret {"x":250,"y":94,"height":20,"editableLeft":72,"editableTop":88,"editableRight":337,"editableBottom":118}
16:19:53.788 +52ms #82 action setCursor {"path":["3c2a3a866a"],"offset":5,"cursorHistoryClear":true,"isKeyboardOpen":true,"preserveMulticursor":true}
16:19:53.800 +11ms #83 caret {"thoughtId":"3c2a3a866a","offset":5,"asyncFocus":false,"transient":false,"hidden":false}
16:19:53.800 +1ms #84 blur {"tag":"BODY","testid":null,"label":null,"contenteditable":null,"relatedTarget":{"tag":"DIV","testid":null,"label":"editable-3c2a3a866a","contenteditable":"true"}}
16:19:53.801 +0ms #85 focus {"tag":"DIV","testid":null,"label":"editable-3c2a3a866a","contenteditable":"true"}
16:19:53.804 +3ms #86 touchend {"x":111,"y":168,"moves":0}
16:19:53.840 +6ms #90 action setCursor {"path":["3c2a3a866a"],"offset":5,"preserveMulticursor":false}
16:19:53.841 +0ms #91 tap {"eventType":"click","cancelable":true,"touching":false,"editingOrOnCursor":true,"isVisible":true,"longPress":"Inactive","touchMoved":false,"isKeyboardOpen":true,"noteFocus":false,"cursorOffset":5,"activeElement":"editable-3c2a3a866a"}
16:19:54.113 +273ms #92 viewport {"reason":"scrollEnd","innerWidth":390,"innerHeight":699,"clientHeight":699,"visualViewportWidth":390,"visualViewportHeight":369,"visualViewportScale":1,"visualViewportOffsetTop":0,"scrollY":0,"isKeyboardOpen":true}
--- state: {"cursor":["3c2a3a866a"],"cursorOffset":5,"isKeyboardOpen":false,"noteFocus":false,"expanded":2,"multicursors":0,"undo":1,"redo":0}
--- state.thoughts: 15 thoughts, 14 lexemes
b6090e4877 "Hello beautiful people in the world" rank:1 parent:00000000000000000000000000000001
ad26e91568 "Two" rank:2 parent:00000000000000000000000000000001
3c2a3a866a "Three" rank:3 parent:00000000000000000000000000000001
Activity