Bug 17649 - Returning false in onmousedown handler: different behavior in various browsers
Summary: Returning false in onmousedown handler: different behavior in various browsers
Status: RESOLVED DUPLICATE of bug 10508
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-03 02:09 PST by Yuzhu Shen
Modified: 2008-03-03 11:45 PST (History)
0 users

See Also:


Attachments
Snapshot of a site that affects by this problem. (118.92 KB, image/jpeg)
2008-03-03 02:11 PST, Yuzhu Shen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuzhu Shen 2008-03-03 02:09:25 PST
Considering the following script:
================================
<form action="">
  <select id="sel">
    <option>a</option>
    <option>b</option>
  </select>
  <input id="in" size="10">
</form>

<script type="text/javascript">
    function MouseClick() {
        return false;
    }
    document.onmousedown = MouseClick;
</script>
================================

By returning false, the default action for onmousedown event is prevented in Safari.
However, IE and Firefox handle this in different way. IE doesn't block the default processing of the event for both <select> list and <input> text box.
Firefox does block the default processing for <input> text box, but doesn't do so for <select> list.

Should we modify the behavior of WebKit to match IE or Firefox?

This problem affects a very popular site in China:
Go to: www.soufun.com
The drop-down lists and input box shown in the snapshot cannot be clicked in Safari. (IE: OK. FF: drop-down lists - OK; input box - Not OK.)

Tested in the following browsers: IE7; FF2/3; Safari 3.0.4
Comment 1 Yuzhu Shen 2008-03-03 02:11:41 PST
Created attachment 19490 [details]
Snapshot of a site that affects by this problem.
Comment 2 Alexey Proskuryakov 2008-03-03 11:45:23 PST

*** This bug has been marked as a duplicate of 10508 ***