Bug 13690 - JavaScript Form Validation issue on Banco do Brasil site
Summary: JavaScript Form Validation issue on Banco do Brasil site
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (Intel) OS X 10.4
: P2 Major
Assignee: Alexey Proskuryakov
URL: https://www2.bancobrasil.com.br/aapf/...
Depends on:
Reported: 2007-05-11 22:55 PDT by Rodrigo Recio
Modified: 2007-05-13 22:09 PDT (History)
2 users (show)

See Also:

proposed fix (7.15 KB, patch)
2007-05-13 04:20 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rodrigo Recio 2007-05-11 22:55:40 PDT
The form field don't validate as expected, in other browsers like firefox it works fine!
Comment 1 Alexey Proskuryakov 2007-05-12 00:48:05 PDT
Is it possible to verify this issue without having an account in this bank? Could you please provide detailed steps to reproduce?

Most importantly, does this happen with nightly WebKit builds? You can get one from <http://nightly.webkit.org>.
Comment 2 Rodrigo Recio 2007-05-12 07:25:31 PDT
Yes, that's it.. go to the URL above and and try to fill numbers in "Agência" and "Conta" fields, if you type 12345 it should appear 1234-5 (like in other browsers), but in webkit it shows 12345-, and in "Conta" field if you try to use backspace (to delete 12345) it will delete 1234 (not 5). Sorry about the lack of instructions.
Comment 3 Rodrigo Recio 2007-05-12 07:26:24 PDT
Well, this happened with yesterday's nightly build, I see that is a new one this morning! :) 
Comment 4 Alexey Proskuryakov 2007-05-12 13:23:42 PDT
Confirmed with r21427 nightly. Thank you for the additional information!
Comment 5 Alexey Proskuryakov 2007-05-13 04:20:27 PDT
Created attachment 14533 [details]
proposed fix

The behavior of setValue for active text input fields didn't match other browsers, and it has actually regressed for inactive fields (the latter problem didn't affect this particular site, though).
Comment 6 Darin Adler 2007-05-13 14:02:00 PDT
Comment on attachment 14533 [details]
proposed fix

+            cachedSelStart = cachedSelEnd = max;

We normally try to stay away from these multiple assignment statements.

Comment 7 Alexey Proskuryakov 2007-05-13 22:09:17 PDT
Committed revision 21448.

> We normally try to stay away from these multiple assignment statements.