Open
Bug 445245
Opened 17 years ago
Updated 3 years ago
No post back when hitting enter key in a select box with mutiple select enabled.
Categories
(Firefox :: Keyboard Navigation, defect)
Firefox
Keyboard Navigation
Tracking
()
NEW
People
(Reporter: bud_n_ca, Unassigned)
Details
(Keywords: regression, testcase, Whiteboard: WONTFIX?)
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
While building a application for a client, I noticed that with Firefox 3.0, upon choosing multiple items in a select box with multiple select enabled, hitting enter produced no post back. This is the case for Firefox 3.0 on Vista and OS X. On the other hand, in Firefox 2.x on Windows and Mac this works as expected, ie., enter key submits multiple selects.
Reproducible: Always
Steps to Reproduce:
1. Make multiple selections in a select box with this feature enabled.
2. Hit enter key.
Actual Results:
No post back occurs and all items but the last are deselected.
Expected Results:
Hitting enter key should result in a post back with the multiple items and the select box should show the selected items as selected. By the way, both IE and Safari support submission of multiple selections for a select box with the enter key, so this is an expected usage for end users.
Since this works fine in Firefox 2.0 I'm wondering if this wasn't a bug introduced by the feature to select multiple span of text with the control key.
Comment 1•17 years ago
|
||
I can't reproduce this, please attach a small example that demonstrates
the problem (use the "Add an attachment" link to upload the file).
Thanks.
| Reporter | ||
Comment 2•17 years ago
|
||
I've uploaded a simple asp.net file which illustrates this bug. Select multiple items in the select box and hit enter. In IE 6-7, Firefox 2 and Safari you will see the multiple items output below the bottom. In Firefox 3, when you hit enter the multiple selects are deselected so that only the last item is output to the screen. Of course in my case I'm having this issue with a post back to the server. Luckily, clicking the link in Firefox 3 has the correct behavior for multiple selections, but most users will expect the enter key to work for submiting multiple selections.
Comment 3•17 years ago
|
||
I don't have an ASP server to run that. Could you save the page as HTML
and upload that please.
| Reporter | ||
Comment 4•17 years ago
|
||
Well, the example needs some kind of server to do the post back. I'm assuming, then, that you're on Apache. Give me some time to try to get a version that works on Apache, which means you'll need to run this as a website on your localhost (127.0.0.1), will that work for you?
| Reporter | ||
Comment 5•17 years ago
|
||
Microsoft has a free version of Visual Studio for Web development which you can download from here:
http://www.microsoft.com/express/download/#webInstall
Then open my sample and hit F5 to run it. Try doing multiple select and hitting enter key in IE, Firefox 2 and Firefox 3. You'll see the problem with incorrect output in Firefox 3.
Comment 6•17 years ago
|
||
(In reply to comment #4)
Yes, I'm on Linux and have a local Apache for testing purposes. Thanks.
| Reporter | ||
Comment 7•17 years ago
|
||
Unfortunately, I couldn't get my sample to run properly on Apache due to dependencies on junk that ASP.NET expects. Ugh! If you could pass my sample on to someone with access to Windows, they should be able to see what I've been talking about. By the way, I managed to resolve the problem with our application on Firefox 3 by capturing the enter key pressed and translating it into an onclick event on the link so that the multiple selections get submitted. It was an ugly workaround, but it solved Firefox 3's problem.
Comment 8•17 years ago
|
||
Here's the HTML that the browser sees. I can confirm it works
in Firefox 2.0.0.16 and IE7, but not Firefox 3.
Comment 9•17 years ago
|
||
It's the "location = document.getElementById('LinkButton1').href;"
that causes the problem. If I replace it with "__doPostBack('LinkButton1','')"
it seems to work.
Comment 10•17 years ago
|
||
Regression window: 2006-10-16-04 -- 2006-10-17-04
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2006-10-16+03%3A00&maxdate=2006-10-17+05%3A00&cvsroot=%2Fcvsroot
I suspect as a result of bug 351633.
Opera, Safari and IE8 does not change the selection on VK_RETURN, which
I think is what causes the problem. I think Firefox's behaviour makes
more sense from a keyboard navigation POV (and is now what HTML5 says -
bug 421933 comment 8), so I don't think we should change that.
Keywords: regression
Whiteboard: WONTFIX?
Updated•17 years ago
|
Version: unspecified → 3.0 Branch
Comment 11•17 years ago
|
||
So the problem is that hitting enter triggers the form submit, and we used to call submit() before that but now no longer do?
Comment 12•17 years ago
|
||
Comment 13•17 years ago
|
||
Comment on attachment 330116 [details]
Testcase (download and run locally)
When run from Bugzilla (https:) it triggers the security dialog because
of the submit to http: so download and run it locally instead.
Attachment #330116 -
Attachment description: Testcase → Testcase (download and run locally)
Comment 14•17 years ago
|
||
(In reply to comment #11)
> So the problem is that hitting enter triggers the form submit
No, hitting enter in a select does not submit a form by default.
(I guess this is what the script is trying to override.)
The problem seems to be that assigning a javascript: url to 'location'
does not run the script immediately as it used to, so the keypress
event that follows runs before the javascript: url does.
The default action for a VK_RETURN keypress event is to activate the
"focused item" and this deselects other items.
So, doing a submit() from a javascript: url will only see one
selected item.
Comment 15•17 years ago
|
||
Ah. And in Opera/IE the javascript: URI runs sync?
Comment 16•17 years ago
|
||
Or the focused item thing doesn't happen?
Comment 17•15 years ago
|
||
This bug was reported using Firefox 3.0 or older, which is no longer supported. The bug has also not been changed in over 500 days and is still in UNCO.
Reporter, please retest this bug in Firefox 3.6.10 or later using a fresh profile, http://support.mozilla.com/en-US/kb/managing+profiles. If you still see this problem, please update the bug. If you no longer see the bug, please set the resolution to RESOLVED, WORKSFORME.
This is a mass search of unconfirmed bugs that have no activity on them, so if you feel a bug was marked in error, just remove the CLOSEME comment in the whiteboard within the next month.
Whiteboard: WONTFIX? → [CLOSEME 2010-11-15]
Comment 18•15 years ago
|
||
The problem still occurs in a recent m-c nightly build.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [CLOSEME 2010-11-15] → WONTFIX?
Version: 3.0 Branch → unspecified
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•