Last Comment Bug 392863 - event.preventDefault() on <select> should prevent dropdown from appearing
: event.preventDefault() on <select> should prevent dropdown from appearing
Status: NEW
: testcase
Product: Core
Classification: Components
Component: Event Handling (show other bugs)
: 9 Branch
: x86 Windows XP
: -- normal with 3 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-20 04:30 PDT by Eugen Konkov
Modified: 2014-08-12 21:23 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Testcase (187 bytes, text/html)
2007-08-20 04:31 PDT, Eugen Konkov
no flags Details
correct testcase (366 bytes, text/html)
2008-08-20 05:28 PDT, Martijn Wargers [:mwargers] (not working for Mozilla)
no flags Details

Description Eugen Konkov 2007-08-20 04:30:23 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

When I subscribe to 'mousedown' event for <select> tag
and call 'event.preventDefault' I do not want list of options to be opened in some cases


Reproducible: Always

Steps to Reproduce:
<script type="text/javascript">

function handler(event) {
 event.preventDefault();
 }

</script>

<select onmouseover='handler'><option>aaa</optioin><option>bbb</option></select>
Actual Results:  
list of options of <select> tag are opened when I call preventDefault from event handler

Expected Results:  
list of options of <select> tag must not be opened when I call preventDefault from event handler

<script type="text/javascript">

function handler(event) {
 event.preventDefault();
 }

</script>

<select onmouseover='handler'><option>aaa</optioin><option>bbb</option></select>
Comment 1 Eugen Konkov 2007-08-20 04:31:37 PDT
Created attachment 277378 [details]
Testcase
Comment 2 Martijn Wargers [:mwargers] (not working for Mozilla) 2008-08-20 05:28:14 PDT
Created attachment 334681 [details]
correct testcase

I don't see how the first testcase would be able to work, but it seems to me this one should.
Comment 3 Olli Pettay [:smaug] (reviewing overload) 2008-08-20 05:59:11 PDT
Or perhaps event handling is better.
Comment 4 Tim (fmdeveloper) 2009-12-10 23:29:34 PST
Is this the same issue as Bug 291082?
Comment 5 Tim (fmdeveloper) 2011-09-03 20:55:45 PDT
Re-reading makes me think this isn't a dupe of Bug 291082.

Confirmed the issue still exists in Mozilla/5.0 (Windows NT 5.1; rv:9.0a1) Gecko/20110903 Firefox/9.0a1 ID:20110903030832
Comment 6 e178699 2014-02-09 23:19:46 PST
Still exists.

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0
Comment 7 Suzanne Tang 2014-08-12 21:23:18 PDT
The bug is still here. 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0

Note You need to log in before you can comment on or make changes to this bug.