<html> | |
<body> | |
<script src="../../../resources/js-test.js"></script> | |
<input type="number" id="input"></input> | |
<script> | |
description('should skip spaces from user input number'); | |
var input = document.getElementById('input'); | |
input.onblur = function() | |
{ | |
shouldBe('input.valueAsNumber', '123456'); | |
shouldBeEqualToString('input.value', '123456'); | |
} | |
window.onload = function() | |
{ | |
input.focus(); | |
document.execCommand('InsertText', false, ' 123 456 ') | |
input.blur(); | |
} | |
</script> | |
</body> | |
</html> | |