Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#12331 closed defect (fixed)

Button: form does not submit on enter on IE w/ dijit button for submit

Reported by: jihohan Owned by: Douglas Hays
Priority: high Milestone: 1.6.1
Component: Dijit - Form Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

If I have a form with digit controls and a native submit button, enter submits. However, once I use the dijit.Button for the submit, it does not auto submit

Attachments (1)

test_enter_key_IE.html (1.1 KB) - added by Jovanovic 9 years ago.
Submit form with enter key Internet Explorer

Download all attachments as: .zip

Change History (15)

comment:1 Changed 9 years ago by bill

Resolution: worksforme
Status: newclosed

It works fine for me, did you look at the example in the documentation? Maybe you forgot the type=submit.

If you can't get it working please attach a test case to the ticket and reopen it or add a comment that you added a test case.

Changed 9 years ago by Jovanovic

Attachment: test_enter_key_IE.html added

Submit form with enter key Internet Explorer

comment:2 Changed 9 years ago by Jovanovic

Resolution: worksforme
Status: closedreopened

It's didn't works for me with Internet Explorer only (tested with IE8).Enter key won't submit form ! When i try declarative example (Version 1.5) with official documentation here http://docs.dojocampus.org/dijit/form/Form, it's doesn't works ! But it's work fine with dojo 1.4. I attach a test file.

comment:3 Changed 9 years ago by bill

OK, thanks for the test case. Is the problem on IE8 like you said in the comment above, or IE6 like you said in the ticket summary?

Also, you have an onSubmit handler that does a "return false", so the form shouldn't submit. What are you expecting to happen?

comment:4 in reply to:  3 Changed 9 years ago by Jovanovic

Replying to bill:

OK, thanks for the test case. Is the problem on IE8 like you said in the comment above, or IE6 like you said in the ticket summary?

Also, you have an onSubmit handler that does a "return false", so the form shouldn't submit. What are you expecting to happen?

Same with IE 6, IE 7. The ticket is not opened by me but i have the same problem. the onSubmit handler execute javascript dialog (alert('Hello');) for show "Hello!" message. It's a example to show if the form is submitted. If you wan't you can remove "return false" it's same. This attachment working with internet explorer for you ?? The dialog "Hello!" is dispayed with IE for you ?

comment:5 Changed 9 years ago by bill

Owner: set to Douglas Hays
Status: reopenednew
Summary: form does not submit on enter on IE6 w/ dijit button for submitButton: form does not submit on enter on IE w/ dijit button for submit

Oh I see... yes, pressing ENTER while focused on the ValidationTextBox doesn't submit the form on IE, although it used to work in dojo 1.4.

This seems familiar, I think it started when we converted button to use <span> for display and a "hidden" <input> node. ENTER-key submit works if I add this CSS:

.dijitOffScreen { visibility: visible !important; }

But I don't know what other side effects that would have (if any), perhaps adding unwanted tabstops etc.

comment:6 in reply to:  5 Changed 9 years ago by Jovanovic

Yes it's working with this Css, good workaround pending a fix. Thanks

comment:7 Changed 9 years ago by Douglas Hays

Milestone: tbd1.6.1
Status: newassigned

comment:8 Changed 9 years ago by Douglas Hays

Resolution: fixed
Status: assignedclosed

(In [24224]) Fixes #12331. Remove visibility:hidden from dijitOffScreen since it seems redundant with being positioned offscreen already.

comment:9 Changed 9 years ago by Douglas Hays

(In [24225]) Refs #12331. Backport [24224] to 1.6.1.

comment:10 Changed 9 years ago by bill

Resolution: fixed
Status: closedreopened

Did you run the regression on this? It seems badly broken. Just open test_Button in FF3.6 (and maybe other browsers too), and try to tab from the "Create" button to the "View" button.

comment:11 Changed 9 years ago by bill

(In case I wasn't clear, the problem is the extra invisible tab stop between the create and view button. Presumably that breaks a lot of regression tests, and is also bad for keyboard users.)

Also, can you add an automated test case for this (submitting via the enter key while focused on a TextBox)? I know we have tests for form submit already, but apparently not for this case.

comment:12 Changed 9 years ago by Douglas Hays

(In [24234]) Refs #12331/[24225]. Remove tab stop to off-screen(hidden) input.

comment:13 Changed 9 years ago by Douglas Hays

Resolution: fixed
Status: reopenedclosed

(In [24235]) Fixes #12331. Refs [24224]. Remove tab stop to off-screen(hidden) input.

comment:14 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.