Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/semantics/forms/the-select-element/select-listbox-selected-hscroll.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Listbox selected option should be visible after horizontal scroll</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="mismatch" href="/css/reference/blank.html">
<style>
#s {
box-sizing: content-box;
width: 1ch;
font: monospace;
overflow: scroll;
outline: none;
border: none;
scrollbar-width: none;
}
</style>
<select id="s" size="2">
<option selected>AAAAA</option>
</select>
<script>
s.focus();
s.scrollLeft = 100000;
</script>