mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-01 00:49:33 +01:00
fix(web): exact iOS caret, review fixes and round-eight items (#830)
Toolbar Enter spends one-shot Ctrl; Backspace finds the last grapheme with Segments.containing(); accessory Shift+Tab keeps the draft like a typed one. Pass the captured session to Compose uploads, voice compose and held CJK drafts; clear Ctrl on deletion-only native edits; path picker clears predictions. Clear xterm dead-key state on native commits; restore a borrowed clipboard field before classifying a key; overlay removeChar spans the pending/flushed boundary. Place the trackpad caret from the overlay layout (getInputAnchor, committedText) or validated xterm cells, hiding when unproven; no end-minus-width arithmetic. Grapheme-aware replay Backspace; docs, README rows, changeset and comment updates.
This commit is contained in:
1 parent
414dd51eb2
commit
cda5d96451
26 files changed
+1072
-170
No files matched your search
@@ -1097,6 +1097,7 @@ const VoiceInput = {
|
||||
// If a compose overlay is already open, populate its textarea instead of recreating
|
||||
const existingTextarea = document.querySelector('.voice-compose-overlay .paste-textarea');
|
||||
if (existingTextarea) {
|
||||
existingTextarea.closest('.voice-compose-overlay').dataset.targetSessionId = target;
|
||||
existingTextarea.value = trimmed;
|
||||
existingTextarea.focus();
|
||||
existingTextarea.selectionStart = existingTextarea.selectionEnd = trimmed.length;
|
||||
@@ -1216,10 +1217,10 @@ const VoiceInput = {
|
||||
|
||||
/** Show an editable compose overlay so the user can review/edit before sending */
|
||||
_showComposeOverlay(text) {
|
||||
const target = this._targetSession();
|
||||
document.querySelector('.voice-compose-overlay')?.remove();
|
||||
const overlay = document.createElement('div');
|
||||
overlay.className = 'voice-compose-overlay paste-overlay';
|
||||
overlay.dataset.targetSessionId = this._targetSession();
|
||||
overlay.innerHTML = `
|
||||
<div class="paste-dialog">
|
||||
<textarea class="paste-textarea">${text.replace(/</g, '<')}</textarea>
|
||||
@@ -1234,7 +1235,7 @@ const VoiceInput = {
|
||||
const send = () => {
|
||||
const val = textarea.value.trim();
|
||||
overlay.remove();
|
||||
if (val) this._sendToTarget(target, val + '\r').catch(() => {});
|
||||
if (val) this._sendToTarget(overlay.dataset.targetSessionId, val + '\r').catch(() => {});
|
||||
};
|
||||
const cancel = () => overlay.remove();
|
||||
const newInput = () => {
|
||||
|
||||
Reference in new issue
Block a user