| <!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> |