Typing 'enter' in other fields trigger the first bueditor button
| Project: | BUEditor |
| Version: | 6.x-1.2 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Similar to http://drupal.org/node/482558 but more generally --
When editing content of certain content types, hitting Enter in an edit field triggers the first BUEditor button (with the default editor, the insert/edit image button).
And actually, when the teaser text area is hidden (so that the "Split summary at cursor" button is displayed), because BUEditor can't find the relevant text area it throws a Javascript error: "NS_ERROR_FAILURE: Component returned failure code: 0x________ (NS_ERROR_FAILURE) [nsIDOMNSHTMLTextAreaElement.selectionStart]".
This bug occurred for example in several content types when the "Body" field was the field immediately after the "Title" field.
I believe this occurs because the buttons in BUEditor are of type , so that when the user hits Enter in a field in the edit form, the web page tries to submit the first image/submit element. Is there another way to code the buttons that don't use the input type?
Peace, community, justice,
- George

#1
When I typed the description I didn't escape my HTML properly -- I meant that I believe the bug occurs because the buttons in BUEditor
<input type="image">#2
Here is a more generic patch altering enter behavior of text fields.
#3
I preferred "input"(type=button or image) as the button html element because:
- it is actually a button
- it has a type attribute allowing both image and text buttons.
- it is a single html element unlike "<a><img></a>"-type buttons
These result in a more solid layout requiring less styling.