[Webkit-unassigned] [Bug 42076] Keyboard operations for <input type=number>
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jul 16 14:59:52 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=42076
--- Comment #6 from Alexey Proskuryakov <ap at webkit.org> 2010-07-16 14:59:52 PST ---
+ - Reject characters other than + - 0-9 . e E
I think that at least this part of patch is wrong enough to be rolled out. Number formatting is different in different locales, and the implementation is not a step in the right direction.
Please roll this out, and let's discuss number validation separately.
+ return ch == '+' || ch == '-' || ch == '.' || ch == 'e' || ch == 'E'
+ || ch >= '0' && ch <= '9';
It's also formatted incorrectly, this line is not long enough to be wrapped.
+ if (key == "Up") {
Should we be checking for modifiers? What if the user presses Shift+Up to select to beginning, for example?
As far as I can tell, the behavior will be wrong.
WebCore/html/HTMLInputElement.cpp:2131
> + }
nit: please add a new line before the "if (isTextField()..."
This style of comment is more precise, but I also find it very difficult to read.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list