Bug 18706 - onblur is called twice
Summary: onblur is called twice
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-23 18:17 PDT by Greg Hulands
Modified: 2011-06-11 11:59 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Hulands 2008-04-23 18:17:27 PDT
<html>
<head>
</head>
<body>
<form>
<script>
function validate(field, regex, error) {
    if (field.value.match(regex) == null) {
        alert(error);
        field.focus();
    }
}
</script>
<input onBlur="validate(this, new RegExp('^\\d{8}$'), 'ID must be 8 digits long.');" type="text" name="19.3.0.1.0.0.1.1.1.3" />
<input type="text"/>
</form>
</body>
</html>
Comment 1 Steffen Otto Jensen 2011-01-08 15:01:38 PST
I have the exact same problem.

Safari: Version 5.0.3 (6533.19.4)

However with Chrome: 8.0.552.231

The event does only fire once, as I think it should.

My code is different, but in essence it does the same thing.

I hope this will be fixed, or someone has a work around for this.
Comment 2 Steffen Otto Jensen 2011-01-08 16:05:05 PST
I just downloaded the nightly build, for both Mac and Windows:

Mac: Version 5.0.3 (6533.19.4, r75294)
 * This fixed the problem

Windows: 5.0.3 (7533.19.4)
 * This fixed the problem

Thanks.