C:\Documents and Settings\billy\Desktop\10-01-2007 - Mac OS

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
Posts: 2
Joined: October 1st, 2007, 3:49 pm

Post Posted October 1st, 2007, 4:01 pm


I am a web developer having problems preventing a newline from being inserted into a TEXTAREA HTML element when hitting enter
when the focus is being programmatically changed from the prior element to the next element in the form.elements list (the web
application I am working on requires that the enter key act like a tab key).

The code works exactly as intended for FireFox running under Windows. However, on Mac OSX the same code results in the
TEXTAREA information being lost upon hitting enter due to focus change and the fact that preventDefault and stopPropagation do
not appear to stop event handling of the enter key as intended.

I have documented everthing in a two page PDF file with the URL provided below.

Any recommendations/workaround would be greatly appreciated.

PDF URL: ... 20Data.pdf


old SKopischke
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted October 1st, 2007, 4:18 pm

Moving to Web Development / Standards Evangelism.


User avatar
Posts: 11073
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted October 1st, 2007, 6:36 pm

Can you load this Enter-form-navigation page and see whether it works on Fx-Mac?
New URL:

It uses onkeypress rather than onkeydown. Maybe that will work better for you.
Last edited by jscher2000 on February 21st, 2010, 7:33 pm, edited 1 time in total.

Posts: 2
Joined: October 1st, 2007, 3:49 pm

Post Posted October 2nd, 2007, 8:31 am

Thank you very much jscher2000! This solution works perfectly. This issue has been driving me insane, thank you very much for pointing me in the right direction.

I tested the page you provided on the same mac setup documented in my PDF and it worked great, the TEXTAREA data is no longer lost.

Return to Web Development / Standards Evangelism

Who is online

Users browsing this forum: No registered users and 0 guests