RESOLVED FIXED 8871
REGRESSION: Pressing Enter/Return in a text input removes the selected text
https://bugs.webkit.org/show_bug.cgi?id=8871
Summary REGRESSION: Pressing Enter/Return in a text input removes the selected text
Alexey Proskuryakov
Reported 2006-05-12 06:12:53 PDT
Pressing Enter or Return in a text field when there is a selection removes the selected part (provided there's no submit button in the form).
Attachments
test case (360 bytes, text/html)
2006-05-12 06:13 PDT, Alexey Proskuryakov
no flags
patch with detailed change log and a layout test (6.31 KB, patch)
2006-07-14 09:41 PDT, Darin Adler
adele: review+
Alexey Proskuryakov
Comment 1 2006-05-12 06:13:14 PDT
Created attachment 8265 [details] test case
Eric Seidel (no email)
Comment 2 2006-05-12 09:35:45 PDT
This could be related to bug 8741
Darin Adler
Comment 3 2006-05-13 18:47:47 PDT
The issue isn't whether the form has a submit button. It's whether there's a form element at all. Here's the code from HTMLInputElement::defaultEventHandler: } else if (clickDefaultFormButton && form()) { form()->submitClick(); evt->setDefaultHandled(); } instead, the code should say: } else if (clickDefaultFormButton) { if (form()) form()->submitClick(); evt->setDefaultHandled(); } Whether Enter is "eaten" by the input element should not depend on whether there's a form or not.
Adele Peterson
Comment 4 2006-05-16 13:52:12 PDT
I have this fix in my tree
Alice Liu
Comment 5 2006-06-06 10:52:04 PDT
Darin Adler
Comment 6 2006-07-14 09:41:06 PDT
Created attachment 9450 [details] patch with detailed change log and a layout test
Darin Adler
Comment 7 2006-07-15 08:16:06 PDT
Committed revision 15454.
Note You need to log in before you can comment on or make changes to this bug.