Closed
Bug 109463
Opened 23 years ago
Closed 23 years ago
Submitting a form by pressing enter drops fields[form sub]
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
VERIFIED
FIXED
mozilla0.9.8
People
(Reporter: mobydisk, Assigned: bzbarsky)
References
()
Details
(Keywords: top100)
Attachments
(2 files, 1 obsolete file)
5.72 KB,
text/html
|
Details | |
3.03 KB,
patch
|
jesup
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20010913
BuildID: 2001091303
If you execute a search using this e*Bay form, clicking the "Search" button is
successful. If you press Enter then Mozilla submits the fields from the
previous form submission, or blank if this is the first time.
Reproducible: Always
Steps to Reproduce:
1.Go to http://pages.ebay.com/search/items/search.html
2.Enter something into the search title. Ex. "ski pants"
3.Press Enter
Actual Results: A blank form is submitted. eBay will return to you the generic
page for an empty search.
Expected Results: Mozilla should have posted the specified form parameters.
1) This form works in IE5.
2) If you press the "Search" button it works.
3) Additional test:
1.Initiate a search by clicking the "search" button as above.
2.Notice that e*Bay tells you what your search string was. Click back.
3.Modify the search and hit Enter (don't press "search")
4.Notice that e*Bay still indicates the same search as before.
Comment 1•23 years ago
|
||
confirmed
Updated•23 years ago
|
Summary: Submitting a form by pressing enter drops fields → Submitting a form by pressing enter drops fields[form sub]
Comment 2•23 years ago
|
||
This test case is the reduced version of what is to see on search.ebay.com.
The problem is that the submit button has a onClick attribute that calls a
needed javascript function. The ENTER key does not trigger onClick.
IE triggers onClick for the submit button also when ENTER is pressed in one of
the form's fields.
--> event handling
Comment 3•23 years ago
|
||
to event handling
Assignee: alexsavulov → joki
Component: Form Submission → Event Handling
QA Contact: vladimire → madhur
Comment 4•23 years ago
|
||
with the testcase provided --
1. I see the bug when I enter some search text in query 2, hit enter from the
textbox field.
2. After entering search text in query 2, if i tab to the submit button or click
on it, the search string is submitted sucessfully.
with the url provided http://pages.ebay.com/search/items/search.html
1. i enter search string in the 1st search box on the top right of the page and
hit enter without tabbing to the submit button - the search string is submitted
successfully.
2. i enter search string in the 'Search title' text box and hit enter - i see
the bug
Updated•23 years ago
|
Target Milestone: --- → mozilla0.9.8
![]() |
Assignee | |
Comment 5•23 years ago
|
||
*** Bug 114383 has been marked as a duplicate of this bug. ***
![]() |
Assignee | |
Comment 6•23 years ago
|
||
*** Bug 115780 has been marked as a duplicate of this bug. ***
Comment 7•23 years ago
|
||
John, does this sound related to your form submission changes?
Comment 8•23 years ago
|
||
As per bug 115780 and Alex's comments, this is caused by the onClick() of the
submit button for the form not being run if you hit return in the form. IE runs
this JS. It makes sense, since hitting return is the equivalent of hitting the
submit button.
Fix that, and this bug is solved. Please....
OS All, platform all, adding Brendan and rods. Is this really "event handling",
BTW? I'd think it was forms or maybe some part of JS.
OS: Windows 98 → All
Hardware: PC → All
Comment 9•23 years ago
|
||
was John's change in the form submission already included in that version?
see the first comment:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20010913
Comment 10•23 years ago
|
||
rjesup: there's no JS involvement, the core engine does not know or care about
things like enter-in-textfield and submit onclick. I agree this is more of a
form bug than an event one, though -- jst, anyone: shouldn't this go to someone
other than joki?
/be
Updated•23 years ago
|
Component: Event Handling → HTML Form Controls
Comment 11•23 years ago
|
||
Yes. HTML Form Controls. The problem is almost certainly that we are not
calling the right function or set of functions when ENTER is pressed.
My changes landed on 10/31, though and if that build ID is right we've been
doing this since 0.9.4. (!) Strange, I didn't think the press-ENTER-to-submit
patch went in 'til 0.9.5, but I could easily be wrong.
Comment 12•23 years ago
|
||
So if it's form controls, I guess it should be reassigned to the owner of that
(rods?) Reassigning to default owner/QA for form controls since the component
was already changed.
Assignee: joki → rods
![]() |
Assignee | |
Comment 14•23 years ago
|
||
Attachment #57704 -
Attachment is obsolete: true
![]() |
Assignee | |
Comment 15•23 years ago
|
||
The behavior of IE5 and IE6 (as tested on that testcase) is as follows:
1) If the form contains only one text (password) input, simply submit the form on
enter in that text (password) input. Submit buttons (if any) are _not_ sent
in the form data that is sent to the server.
2) If the form contains 2 or more text (password) inputs, trigger the submit
button. This means that the submit button's onclick event is fired (before
the form's onsubmit) and the submit button value is sent to the server.
![]() |
Assignee | |
Comment 16•23 years ago
|
||
Passes the testcases in this bug, as well as the testcase in bug 99210 (so no
regressions).
Rod, would you review?
![]() |
Assignee | |
Comment 17•23 years ago
|
||
Comment 18•23 years ago
|
||
Comment on attachment 64976 [details] [diff] [review]
Proposed patch
r=rjesup@wgate.com (for whatever it's worth; I've hacked on forms some for
<select>)
Attachment #64976 -
Flags: review+
Comment 19•23 years ago
|
||
Comment on attachment 64976 [details] [diff] [review]
Proposed patch
I concur with that assessment if it's worth any more :) r=jkeiser
Comment 20•23 years ago
|
||
Comment on attachment 64976 [details] [diff] [review]
Proposed patch
sr=jst
Attachment #64976 -
Flags: superreview+
Comment 22•23 years ago
|
||
I haven't applied the patch and tested it, but it looks right. r=rods
![]() |
Assignee | |
Comment 23•23 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 24•23 years ago
|
||
verifying on build 2002-01-28-03-trunk on windows 98
and on 2002-01-28-08-trunk on RedHat Linux 6.2
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•