The default bug view has changed. See this FAQ.

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

NEW
Unassigned

Status

()

Core
Event Handling
10 years ago
3 years ago

People

(Reporter: Eugen Konkov, 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

10 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

10 years ago
Created attachment 277378 [details]
Testcase

Updated

10 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

9 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

Updated

9 years ago
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

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

Updated

6 years ago
Whiteboard: [dupeme?]

Comment 5

6 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

3 years ago
Still exists.

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

Comment 7

3 years ago
The bug is still here. 
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
You need to log in before you can comment on or make changes to this bug.