-
Bug
-
Resolution: Fixed
-
Low
-
1.4
-
None
-
Windows XP Pro, Tomcat 5.0, MySQL 4.1
When re-editing a blog post, the "News Title" field is disabled. This causes IE 6.0 to throw a JavaScript error. We traced it back to the function placeFocus() in "decorators/effects.js". The function placeFocus() is called in the body's onload event and performs the following:
function placeFocus() {
[...]
var currSet=document.forms[i].elements;
[...]
if (currSet[j].type=='text' || currSet[j].type=='password' || currSet[j].type=='textarea')
[...]
}
When an element is in "disabled" mode, the focus method is not applicable for IE. We tried it in Firefox as well but no error was thrown there, so this is simply IE not accepting the focus() method for disabled form elements.
To prevent the error from being shown, we modified the placeFocus() function such as:
function placeFocus() {
[...]
if ((currSet[j].type=='text' || currSet[j].type=='password' || currSet[j].type=='textarea') && !currSet[j].disabled){ currSet[j].focus(); stopNow=true; break; }
[...]
}
We needed to fix this because the error was preventing some other custom JavaScript code we have from running (we are working on a WYSIWYG add-on... stay tuned).
-George
[CONFSERVER-3288] JavaScript error in IE when re-editing a blog post
Workflow | Original: JAC Bug Workflow v3 [ 2887577 ] | New: CONFSERVER Bug Workflow v4 [ 2981306 ] |
Workflow | Original: JAC Bug Workflow v2 [ 2796162 ] | New: JAC Bug Workflow v3 [ 2887577 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: JAC Bug Workflow [ 2733656 ] | New: JAC Bug Workflow v2 [ 2796162 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2399050 ] | New: JAC Bug Workflow [ 2733656 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 [ 2297342 ] | New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2399050 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2232681 ] | New: Confluence Workflow - Public Facing - Restricted v5 [ 2297342 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2193102 ] | New: Confluence Workflow - Public Facing - Restricted v5.1 - TEMP [ 2232681 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v5 [ 1933136 ] | New: Confluence Workflow - Public Facing - Restricted v5 - TEMP [ 2193102 ] |
Workflow | Original: Confluence Workflow - Public Facing - Restricted v3 [ 1732935 ] | New: Confluence Workflow - Public Facing - Restricted v5 [ 1933136 ] |
Workflow | Original: CONF Bug Subtask WF (TEMP) [ 1689267 ] | New: Confluence Workflow - Public Facing - Restricted v3 [ 1732935 ] |