Bug 13690

Summary: JavaScript Form Validation issue on Banco do Brasil site
Product: WebKit Reporter: Rodrigo Recio <rjrecio>
Component: FormsAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Major CC: ap, rjrecio
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac (Intel)   
OS: OS X 10.4   
URL: https://www2.bancobrasil.com.br/aapf/aai/login.pbk
Attachments:
Description Flags
proposed fix darin: review+

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.

r=me
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.

Fixed.