Bug 55649
| Summary: | onclick confirm() ignores first button click | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Anthon Pang <anthon.pang> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED CONFIGURATION CHANGED | ||
| Severity: | Minor | CC: | ahmad.saleem792, ap |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows Vista | ||
Anthon Pang
If the click handler opens a confirmation dialog, the first button click (either "Ok" or "Cancel") is ignored.
Bug found in Safari 5.0.3 and reproduceable in WebKit nightly r79994. (Not present in IE8, FF4b12, or Opera 11.01.)
Test case:
<html>
<head><title>Ignore first click in confirm()</title></head>
<body>
<script type="text/javascript">
function doConfirm() {
if (!confirm('test')) {
return false;
}
}
</script>
<a href="#" onclick="javascript:doConfirm();">Click</a>
</body>
</html>
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I am unable to reproduce this bug from attached test case in Comment 0 using Safari 15.6 on macOS 12.5 turned into JSFiddle:
Link - https://jsfiddle.net/Lx8ru9bg/show
It register my first click always and is same as other browsers (Chrome Canary 106 and Firefox Nightly 105). Going to mark this as "RESOLVED CONFIGURATION CHANGED". Thanks!