htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
(More) htmlarea steals focus


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


dwf
New User

Oct 18, 2004, 2:16 PM

Post #1 of 1 (2992 views)
Shortcut
(More) htmlarea steals focus Can't Post

My form starts with several text fields, and ends with three htmlareas. When the form loads, I would like the focus to be on the first input element. Based on a post in this forum dealing with a similar issue, I made the following change to htmlarea.js:


Code
// focuses the iframe window.  returns a reference to the editor document. 
HTMLArea.prototype.focusEditor = function() {
switch (this._editMode) {
//case "wysiwyg" : this._iframe.contentWindow.focus(); break;
// REPLACED THE ABOVE ORIGINAL LINE WITH THE FOLLOWING:
case "wysiwyg" : document.forms[0].elements[0]; break;


This seems to have fixed the problem for Firefox/Mozilla, but not IE. Does anyone have an idea of how I might fix this to work with both Firefox and IE?

Here is an example page:
http://toolshare.mosaicinfo.org/htmlarea/psbio/bioEntryForm.html

To see it in additional context, the "Edit" option here, a ColdFusion template, also suffers from the problem.
http://toolshare.mosaicinfo.org/htmlarea/psbio/

 
 
 


Search for (options)