summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/selection/crashtests/selection-modify-around-input.html
blob: 24b9ae7d35bea3510bb21ca03787436db64cbc47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
div {
  border: medium solid red;
  border-width: 32em;
}
</style>
<script>
document.addEventListener("DOMContentLoaded", () => {
  document.execCommand("selectAll");
  getSelection().modify("move", "backward", "character");
  getSelection().collapseToStart();
}, {once: true});
</script>
</head>
<body>
<button contenteditable></button>
<input value="a">
<div></div>
</body>
</html>