Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE html>
<html class="reftest-wait">
<title>Reference: Input scrolled to end</title>
<style>
input {
width: 100px;
overflow: hidden;
white-space: nowrap;
/* text-overflow: clip; default */
font-family: monospace;
font-size: 20px;
}
</style>
<input type="text" value="01234567890123456789">
<script>
requestAnimationFrame(() => {
const input = document.querySelector('input');
// Scroll to end
input.scrollLeft = input.scrollWidth;
document.documentElement.classList.remove('reftest-wait');
});
</script>
</html>