blob: 6902b83b846959cad5a77328585bf0523fe0ec06 [file] [edit]
<!DOCTYPE html>
<html class="reftest-wait">
<script>
onload = async () => {
const select = document.querySelector('select');
select.setCustomValidity('validity');
select.reportValidity();
const textarea = document.querySelector('textarea');
textarea.setRangeText('lol');
select.autofocus = true;
await new Promise(resolve => setTimeout(resolve, 0));
select.reportValidity();
textarea.blur();
await new Promise(resolve => requestAnimationFrame(resolve));
document.documentElement.classList.remove('reftest-wait');
}
</script>
<body>
<p>The onchange should not be triggered by textarea when it got something changed without being focused. Pass if not crashed, and the focused select box is displayed.</p>
<select></select>
<textarea onchange="document.all[2].appendChild(document.querySelector('select'));"></textarea>
</body>
</html>