Closed Bug 922082 Opened 11 years ago Closed 11 years ago

<select> with disabled and "display:none" option: Alpha-key selects hidden entry

Categories

(Core :: Layout: Form Controls, defect)

24 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: markus.kell.r, Assigned: MatsPalmgren_bugz)

Details

Attachments

(2 files)

Attached file test.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130910160258

Steps to reproduce:

In a <select> list with disabled and invisible options (e.g. in the second list in the attachment), try to jump to an option by typing its first letter.


Actual results:

Focus jumps to before the first option.


Expected results:

Should jump to the first of the actually visible elements that matches the typed letter.
<option>s with disabled attribute and style { display: none; } should not be considered when performing typing prefix completion.

In real life, this bug can be seen in Bugzilla 4.4, e.g. here, when you select the Product field and then type "s":
https://landfill.bugzilla.org/bugzilla-4.4-branch/query.cgi?classification=Unclassified
It works fine if you remove the "Classification" filter.

Bugzilla 4.2 used a different strategy to filter <select> lists, that's why this Firefox bug is not yet visible in the current bugzilla.mozilla.org. Works fine in Chrome.

Original report in Eclipse's Bugzilla:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=416542
Use this Landfill link to ensure you're on the advanced search page: https://landfill.bugzilla.org/bugzilla-4.4-branch/query.cgi?format=advanced&classification=Unclassified
Summary: <select> with disabled and invisible option: Alpha-key select hidden entry → <select> with disabled and "display:none" option: Alpha-key selects hidden entry
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Whiteboard: DUPEME
Attached patch fixSplinter Review
https://tbpl.mozilla.org/?tree=Try&rev=07e14e6bd426
Assignee: nobody → matspal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #812849 - Flags: review?(bzbarsky)
Comment on attachment 812849 [details] [diff] [review]
fix

r=me
Attachment #812849 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/8bc54ab0ef14
Flags: in-testsuite?
OS: Windows 7 → All
Hardware: x86_64 → All
https://hg.mozilla.org/mozilla-central/rev/8bc54ab0ef14
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: