event.preventDefault() on <select> should prevent dropdown from appearing

RESOLVED DUPLICATE of bug 1019630

Status

()

RESOLVED DUPLICATE of bug 1019630
12 years ago
a year ago

People

(Reporter: kes-kes, Unassigned)

Tracking

({testcase})

9 Branch
x86
Windows XP
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

366 bytes, text/html
Details
(Reporter)

Description

12 years ago
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>
(Reporter)

Comment 1

12 years ago
Created attachment 277378 [details]
Testcase

Updated

12 years ago
Component: General → DOM: HTML
Product: Firefox → Core
QA Contact: general → general
Summary: Can not prevent Default action for <Select> tag → event.preventDefault() on <select> should prevent dropdown from appearing

Updated

11 years ago
Component: DOM: HTML → DOM: Core & HTML
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.
Attachment #277378 - Attachment is obsolete: true
Component: DOM: Core & HTML → DOM: Events
Keywords: testcase
QA Contact: general → events
Component: DOM: Events → Layout: Form Controls
QA Contact: events → layout.form-controls
Or perhaps event handling is better.
Component: Layout: Form Controls → Event Handling
QA Contact: layout.form-controls → events

Comment 4

9 years ago
Is this the same issue as Bug 291082?

Updated

8 years ago
Whiteboard: [dupeme?]

Comment 5

8 years ago
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
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [dupeme?]
Version: unspecified → 9 Branch

Comment 6

5 years ago
Still exists.

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0

Comment 7

5 years ago
The bug is still here. 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
We got several bugs which all about preventDefault on key/mouse events don't stop the default action of a select element. The behavior was the same as other browsers at that time. Now looks like all browsers stop default behavior except Firefox. We probably should collect the behavior of all browsers and align the behavior for compatibility with other browsers. Let's keep Bug 1019630 open (to cover the cases of mouse and keyboard events) and close the others.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1019630
You need to log in before you can comment on or make changes to this bug.