MantisBT - ATutor
View Issue Details
0003119ATutor- no cat -public2007-08-01 10:522009-07-21 08:51
harris 
harris 
normalminoralways
closedfixed 
1.5.5 
1.6.2 
SVN
0003119: Pressing Enter does not submit the form
After filling out forms such as Create Category, Add announcement, etc; pressing enter in textboxes does not submit the form. Different browsers react differently to this enter event.

For example, IE7 refreshed the page, while Firefox2 triggerred another button.
No tags attached.
Issue History
2007-08-01 10:52harrisNew Issue
2007-08-01 10:52harrisAffects version => SVN
2008-11-14 05:14gregStatusnew => assigned
2008-11-14 05:14gregAssigned To => harris
2008-11-14 05:21IndieRectNote Added: 0003343
2008-11-14 11:16harrisNote Added: 0003377
2008-11-18 06:33harrisNote Added: 0003388
2008-11-18 06:34harrisNote Added: 0003389
2008-11-18 06:42harrisStatusassigned => resolved
2008-11-18 06:42harrisFixed in Version => 1.6.2
2008-11-18 06:42harrisResolutionopen => fixed
2008-11-18 06:42harrisNote Added: 0003390
2009-07-21 08:51gregStatusresolved => closed

Notes
(0003343)
IndieRect   
2008-11-14 05:21   
I noticed a similar thing when creating/editing a course: Enter goes to "Switch to visual editor" button above the banner field. The same seems to be true for announcements.
(0003377)
harris   
2008-11-14 11:16   
A form with more than 1 <input type="submit" ..> will cause this problem. The form doesn't know which submit it should triggers, some browsers takes the first one, some just ignores.

To address this, we will have to have only 1 type="submit" input in a single form. The rest can use a javascript to trigger the event.
(0003388)
harris   
2008-11-18 06:33   
for some reason...
<input type="button" onclick="this.form.submit()"> does not work
(0003389)
harris   
2008-11-18 06:34   
Redeclare the submit button ahead of all input="submit"
(0003390)
harris   
2008-11-18 06:42   
Added this under the hidden field of the form to set the input="submit" order.
<input type="submit" name="submit" style="display:none;"/>

Affected Files:
editor/add_news.php
editor/edit_content.php
editor/edit_news.php
file_storage/edit.php
file_storage/new.php
include/html/course_properties.inc.php
tools/filemanager/edit.php


8237