﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
8456	blinking cursor causes null pointer	Henrik Helmø Larsen		"I have received some errors from the wysiwygarea plugin.js line 1182 in CKEditor version 3.6.2. It is were editor.document.$.designMode is set to 'off'.

At this place the at setTimeout function has been called with a delay of 50 ms. The problem is that editor.document in the meantime has been set to null.

So the following code from the plugin fails:

{{{
editor.document.$.designMode = 'on';
setTimeout( function()
{
  editor.document.$.designMode = 'off';
  if ( CKEDITOR.currentInstance == editor )
    editor.document.getBody().focus();
}, 50 );
}}}

My suggestion is to insert a check for editor.document inside the setTimeout function:

{{{
editor.document.$.designMode = 'on';
setTimeout( function()
{
  if ( editor.document )
  {
    editor.document.$.designMode = 'off';
    if ( CKEDITOR.currentInstance == editor )
      editor.document.getBody().focus();
  }
}, 50 );
}}}
"	Bug	closed	Normal		General		invalid		
