fix: éditeur Forge — textarea qui ne grandit pas après insertion programmatique (tableau/code) #BUG-116
CI / lint (push) Successful in 3m17s
CI / security (push) Successful in 2m0s
CI / test (push) Successful in 5m14s
CI / build (push) Successful in 1m49s
CI / e2e (push) Successful in 17m57s

This commit is contained in:
2026-10-14 22:09:28 -04:00
parent 1892062d88
commit ed9029d760
11 changed files with 35 additions and 14 deletions
+6
View File
@@ -500,6 +500,10 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
ta.value = val().substring(0, p.s) + text + val().substring(p.e);
var np = cursorOffset != null ? p.s + cursorOffset : p.s + text.length;
setPos(np);
// Mutation programmatique : pas d'evenement 'input' → sans autoHeight/updateLineNumbers,
// sinon la textarea reste d'une ligne quand on insère un tableau/code.
autoHeight();
updateLineNumbers();
markDirty();
}
@@ -509,6 +513,8 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
var sel = val().substring(p.s, p.e);
ta.value = val().substring(0, p.s) + before + sel + (after || before) + val().substring(p.e);
setPos(p.s + before.length + sel.length + (after || before).length);
autoHeight();
updateLineNumbers();
markDirty();
}