Hack to prevent iframe from being incorrectly positioned if there is a closing (and thus moving) message or error box.
This commit is contained in:
parent
4675c5969b
commit
83e2db29f1
|
@ -232,6 +232,14 @@ Editor.prototype.claim_iframe = function ( position_after ) {
|
|||
if ( this.iframe )
|
||||
return;
|
||||
|
||||
// hack to prevent iframe from being incorrectly positioned if there is a closing (and thus
|
||||
// moving) message or error box
|
||||
if ( getElementsByTagAndClassName( "div", "message" ).length > 0 ||
|
||||
getElementsByTagAndClassName( "div", "error" ).length > 0 ) {
|
||||
setTimeout( function() { self.claim_iframe( position_after ); }, 25 );
|
||||
return;
|
||||
}
|
||||
|
||||
// claim the reusable iframe for this note, stealing it from the note that's using it (if any)
|
||||
this.iframe = Editor.shared_iframe.iframe;
|
||||
this.iframe.setAttribute( "id", iframe_id );
|
||||
|
|
Reference in New Issue