Does this work with Chrome? It seems like I've seen Chrome refuse to use the enter key when there is more than one submit on the page.
-Randy On Mon, Mar 8, 2010 at 1:55 AM, Pierre Rineau. < [email protected]> wrote: > On Wed, 2010-03-03 at 14:55 -0500, Andrew Berry wrote: > > On 2010-03-03, at 6:01 AM, Pierre Rineau. wrote: > > > > > Found my own solution, a jQuery based script that searchs for a > specific > > > class on form input elements and trick the browser by preprending a > > > cloned version of the default submit button on top of the form. > > > > When I've dealt with this in the past, I've caught the input event and > fired the appropriate action. How does that compare to your solution? > > > > --Andrew > > I read some posts saying that catching the enter key can be hard to do > with some browsers. I finally choose another solution: copying the > default button DOM element on top of the form, but hidden in order to be > fully transparent for the end user. It seemed to be the nicest solution > because it does not requires your javascript to add any events on > buttons and it let the browser do its job. > > See http://drupal.org/project/default_submit > > Regards, > Pierre. > > > > -- Randy Fay Drupal Development, troubleshooting, and debugging [email protected] +1 970.462.7450
