Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
javascript
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2009 at 21:19 UTC
Updated:
19 Nov 2009 at 01:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
carlos8f commentedComment #2
carlos8f commentedI found #212423: Standardize form submission behavior when "enter" key is pressed, in which this bug is mentioned. I like @David_Rothstein's initiative, but preventing accidental submission is minor compared to a bug preventing multi-line content from being created.
The code that disables the enter key is described in http://drupal.org/node/212423#comment-2128568.
To replicate, install 7.x-dev and go to node/add/article; you won't be able to make any line breaks in the node body. Disabling the file/image modules or commenting out the "return false" on ajax.js line 177 makes the enter key work again. I don't know enough about the Drupal.ajax method to recommend a fix yet.
Comment #3
carlos8f commentedHere's a "quick and dirty" fix for this. It keeps track of the page focus and disables Drupal.ajax's keypress trigger if a textarea is in focus.
Comment #4
carlos8f commentedduplicate of #615282: Enter key is ignored on pages with #ajax fields.