fix: éditeur Forge — textarea qui ne grandit pas après insertion programmatique (tableau/code) #BUG-116
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user