test(inputs) : tests mode contrôlé email + commentaire caret jsdom
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -185,7 +185,8 @@ const onInput = (event: Event) => {
|
||||
|
||||
if (sanitized !== raw) {
|
||||
// `<input type="email">` ne supporte pas l'API de sélection :
|
||||
// selectionStart vaut null, setSelectionRange lève. On garde défensivement.
|
||||
// selectionStart vaut null et setSelectionRange lève en navigateur.
|
||||
// (En jsdom selectionStart peut renvoyer un nombre, d'où le code gardé ci-dessous.)
|
||||
const caret = target.selectionStart
|
||||
target.value = sanitized
|
||||
if (caret !== null) {
|
||||
|
||||
Reference in New Issue
Block a user