summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/text/text-select-invisible.html
blob: fd57541a3730809c3a1c521031e0b971ff0b96c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<input id="visible" value="text0">
<input id="hidden" value="text1" style="display: none">
<script>
description("This test confirms that select an hidden input element does not cause focus change.");
visible.select();
shouldBe('getSelection().anchorNode', 'document.body');
shouldBe('getSelection().anchorOffset', '3');
hidden.select();
shouldBe('getSelection().anchorNode', 'document.body');
shouldBe('getSelection().anchorOffset', '3');
</script>
</body>
</html>