mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
28
layout/base/tests/input-maxlength-valid-change.html
Normal file
28
layout/base/tests/input-maxlength-valid-change.html
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!-- Test: input with maxlength is valid if the user edits and it's not too long -->
|
||||
<head>
|
||||
<style>
|
||||
:valid { background-color:green; }
|
||||
:invalid { background-color:red; }
|
||||
* { background-color:white; }
|
||||
</style>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script>
|
||||
function runTest() {
|
||||
var input = document.getElementById('input');
|
||||
input.setSelectionRange(input.value.length, input.value.length)
|
||||
input.focus();
|
||||
synthesizeKey('VK_BACK_SPACE', {}); // so that it becomes invalid first
|
||||
input.blur();
|
||||
input.focus();
|
||||
synthesizeKey('VK_BACK_SPACE', {});
|
||||
input.blur(); // to hide the caret
|
||||
document.documentElement.className='';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body onload="runTest()">
|
||||
<input id="input" maxlength="3" value="foooo">
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue