next2world / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

custom fields with arbitrary masks treat nonmask characters as literal substitutions #124

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. have custom form field with arbitrary mask "999 999-9999"
2. attempt to enter "2056334747" as phone number and move to next field

What is the expected output? What do you see instead?
Acrobat formats the resulting field to "205 633-4747", silently inserting the 
nonmask characters. This is expected. Likewise, literally entering 
"205633-4747" or "205 6334747" or "205 633-4747" result in the same formatted 
output without error. 

In other words, nonmask characters in arbitrary masks are optional inputs and 
while the form input engine allows the user to type them, it doesn't expect 
them to and will generate them from the mask.

Chrome treats nonmask characters as literal substitutions, so the field gets 
"205 334-47" and gives the JavaScript alert "The input value is invalid." when 
leaving the field because the input's too short.

What version of the product are you using? On what operating system?
Chrome  40.0.2214.111 (64-bit), OS X 10.9.5

Please provide any additional information below.

Original issue reported on code.google.com by ydoomen...@gmail.com on 19 Feb 2015 at 6:51