Textarea Returns Page to Top Upon "Enter"
August 11, 2008 5:15 PM Subscribe
Question about long forms, textareas, and unwanted scroll to page top on hitting "enter," possibly involving tinymce.
I have a longish, scrolling page which contains a form. If a user is filling out a textarea which is below the "fold" and they create a new paragraph by hitting enter or return, the page returns to the top, even though the cursor is still in the textarea and the new paragraph was properly inserted. In other words, the area they're working in disappears from sight and the page has to be scrolled down to see it again.
This is very very annoying. Is this browser-typical behavior, or something in the coding of tinymce (the wysiwyg editor added to textareas). Is there anything I can do to prevent this from happening which doesn't involve moving the textarea up the page?
I have a longish, scrolling page which contains a form. If a user is filling out a textarea which is below the "fold" and they create a new paragraph by hitting enter or return, the page returns to the top, even though the cursor is still in the textarea and the new paragraph was properly inserted. In other words, the area they're working in disappears from sight and the page has to be scrolled down to see it again.
This is very very annoying. Is this browser-typical behavior, or something in the coding of tinymce (the wysiwyg editor added to textareas). Is there anything I can do to prevent this from happening which doesn't involve moving the textarea up the page?
Response by poster: Hm. This is in a password protected area I can't really provide a link into. This happens in FF 2 & 3 on both Macs and Windows. Thanks for the idea about the JS, let me see if anything is running there.
posted by maxwelton at 10:38 PM on August 11, 2008
posted by maxwelton at 10:38 PM on August 11, 2008
Response by poster: Well, that was easy enough to test. It must be something within tiny_mce. With that, I'll move y question to their support forums. Dur. But thanks.
posted by maxwelton at 10:47 PM on August 11, 2008
posted by maxwelton at 10:47 PM on August 11, 2008
This thread is closed to new comments.
I tried the current demo with Safari and Firefox 3 and made the form go below the fold. It behaves as expected.
Perhaps there is a JavaScript which changes focus onKeyUp?
posted by pedantic at 5:57 PM on August 11, 2008