Skip to content
Snippets Groups Projects
Commit f34fb0d8 authored by Ion Agorria's avatar Ion Agorria
Browse files

More consistent check

parent ceb29207
Branches
No related tags found
No related merge requests found
...@@ -518,7 +518,7 @@ jQuery(document).ready(function() { ...@@ -518,7 +518,7 @@ jQuery(document).ready(function() {
/* focus work on a standard textarea but not if field was replaced with CKEDITOR */ /* focus work on a standard textarea but not if field was replaced with CKEDITOR */
jQuery('#dp_desc').focus(); jQuery('#dp_desc').focus();
/* focus if CKEDITOR */ /* focus if CKEDITOR */
if (typeof(CKEDITOR) !== 'undefined') if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances[key] != "undefined")
{ {
var editor = CKEDITOR.instances['dp_desc']; var editor = CKEDITOR.instances['dp_desc'];
if (editor) { editor.focus(); } if (editor) { editor.focus(); }
...@@ -624,7 +624,7 @@ jQuery(document).ready(function() { ...@@ -624,7 +624,7 @@ jQuery(document).ready(function() {
/* focus work on a standard textarea but not if field was replaced with CKEDITOR */ /* focus work on a standard textarea but not if field was replaced with CKEDITOR */
jQuery('#dp_desc').focus(); jQuery('#dp_desc').focus();
/* focus if CKEDITOR */ /* focus if CKEDITOR */
if (typeof(CKEDITOR) !== 'undefined') if (typeof CKEDITOR == "object" && typeof CKEDITOR.instances != "undefined" && CKEDITOR.instances[key] != "undefined")
{ {
var editor = CKEDITOR.instances['dp_desc']; var editor = CKEDITOR.instances['dp_desc'];
if (editor) { editor.focus(); } if (editor) { editor.focus(); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment