In a discussion about a click to play/pause feature for Opera on
Android, the issue of click event handlers came up.[1] The problem is that
pages can do things like this:
v.onclick = function() {
if (v.paused) {
v.play();
} else {
v.pause();
}
// no preventDefault()
}
I
Hi,
The current whatwg standard [1] states that maxlength is not a valid attribute
for input[type=number].
I built a form and tested it in Firefox, which honours the maxlength attribute,
and then found that Chrome did not.
I thought this was a bug, so I reported it to Chromium [2], who
Why would you want to set maxlength as opposed to setting max?
On Thu, Jun 27, 2013 at 5:42 PM, Steve Hoeksema st...@kotiri.com wrote:
Hi,
The current whatwg standard [1] states that maxlength is not a valid
attribute for input[type=number].
I built a form and tested it in Firefox, which
In my specific case, a numeric code with a maximum length.
Say it's 4 digits, and I'm using Chrome. I can put max=, but the browser
still allows me to type 12345. It won't allow me to submit the form, and it
highlights it as an error, but I can still enter it. Using a maxlength means I
2013-06-28 1:09, Scott González wrote:
Why would you want to set maxlength as opposed to setting max?
People want to do such things to cover old browsers that do not support
type=number. Such browsers ignore both the type attribute and the max
attribute, so to impose *some* limits, people
On 6/27/13 5:42 PM, Steve Hoeksema wrote:
I built a form and tested it in Firefox, which honours the maxlength attribute,
and then found that Chrome did not.
Note that I assume you tested this in a version of Firefox which does
not support type=number... so it was treated as type=text.
Note that I assume you tested this in a version of Firefox which does not
support type=number... so it was treated as type=text.
So it does. I missed that - I was only entering numbers at that point. (FF 22.0
on OS X)
On Thu, Jun 27, 2013 at 3:18 PM, Steve Hoeksema st...@kotiri.com wrote:
In my specific case, a numeric code with a maximum length.
Say it's 4 digits, and I'm using Chrome. I can put max=, but the browser
still allows me to type 12345. It won't allow me to submit the form, and it
Numeric codes are almost certainly actually type=text, with a
pattern=\d+ or the like. If the first digit is allowed to be 0,
it's not type=number. Note that we have the inputmode attribute