- float_space.setStyle( 'top', pixelate( editorPos.y + editorRect.height - floatRect.height + 1) );
- float_space.setStyle( 'right', pixelate( viewRect.width - editorRect.right ) );
+ if (inline) {
+ var dialogPos = dialog.getDocumentPosition();
+ float_space.setStyle( 'top', pixelate( editorPos.y - dialogPos.y + editorRect.height - floatRect.height + 1 ) );
+
+ //float_space.setStyle( 'left', pixelate( editorPos.x - dialogPos.x + editorRect.width - floatRect.width ) );
+ // floatRect.width seems to be far to high on first dialog popup
+ float_space.setStyle( 'left', pixelate( editorPos.x - dialogPos.x + editorRect.width - 11 ) );
+ } else {
+ float_space.setStyle( 'top', pixelate( editorPos.y + editorRect.height - floatRect.height + 1) );
+ float_space.setStyle( 'right', pixelate( viewRect.width - editorRect.right ) );
+ }