You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Riesgo:** Bajo — cambio de 1 línea lógica + actualización de test
110
+
111
+
### El Problema
112
+
113
+
En el modo de comportamiento de Enter configurado como `newline`, Shift+Enter enviaba un mensaje vacío en lugar de insertar una nueva línea. La condición original incluía `event.shiftKey` junto con `ctrlKey` y `metaKey` como combinaciones de envío:
114
+
115
+
```typescript
116
+
// ANTES (incorrecto)
117
+
if (event.shiftKey||event.ctrlKey||event.metaKey) {
118
+
event.preventDefault()
119
+
onSend()
120
+
}
121
+
```
122
+
123
+
### La Solución
124
+
125
+
Remover `event.shiftKey` de la condición. Solo Ctrl/Cmd+Enter envían mensajes en modo newline:
126
+
127
+
```typescript
128
+
// DESPUÉS (correcto)
129
+
if (event.ctrlKey||event.metaKey) {
130
+
event.preventDefault()
131
+
onSend()
132
+
}
133
+
```
134
+
135
+
### Comportamiento Corregido
136
+
137
+
| Tecla | Modo `submit` (default) | Modo `newline`|
0 commit comments