Unexpected error in innerDocument #326

Closed
antoinelyset opened this Issue May 22, 2012 · 5 comments

Comments

Projects
None yet
2 participants

Hi,

I got this error :

 Unexpected error in innerDocument 

and :

Uncaught TypeError: Object #<HTMLIFrameElement> has no method 'open'

I use jwysiwyg in a Twitter Bootstrap Modal.

I investigated myself and I think it could happen when the innerDocument method tries to access to element.contentDocument (I use Chrome) before the iframe is up and running totally. (see https://github.com/akzhan/jwysiwyg/blob/master/jquery.wysiwyg.js#L1606)

Thanks.

Did I do something wrong ?

I debugged manually and found no problems if you let the iframe load.

Strange bug.

fdn commented Jun 28, 2012

I ran into this issue as well. The problem for me was due to attempting to create the editor in a DOM element before it was attached to the document. When I waited until the editor's parent was attached to the document, this error went away.

Hi,

Thanks for the reply. Just to know, how did you wait ? You used jQuery .ready() ?

I think this issue is old and misleading.

Thanks for you work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment