Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2010-06-29 01:01:56

mark_d_drake
New member
Registered: 2007-09-29
Posts: 4

Help.. Xinha does not initialize correctly. Maximize fixes issues

When I first uncover my Xinha it appears as follows

XinhaError.png

If I Maximize and then restore it everything works as expected..

The code for the Xinha Area is

        <div style="display: none;" id="editDescriptionDialog" onclick="stopBubble(event)">
            <div style="position:relative; top: 0px;">
                <div class="popupOuterEdge" style="top: 10px; left: 10px;">
                    <div id="editDescriptionContainer" class="popupBackground" style="width:670px;">
                        <div class="popupInnerEdge">
                            <div class="row popupTitle">
                                <xsl:text>Edit Image Description (HTML)</xsl:text>
                            </div>
                            <div style="height:5px"/>
                            <div align="center">
                                <textarea name="xinhaDescriptionEditor" id="xinhaDescriptionEditor" rows="10" cols="80"/>
                            </div>
                            <div style="height:5px;"/>
                            <div style="text-align:right;">
                                <span id="resetDescriptionOption" style=":display:none;">
                                    <img id="btnResetTitle" src="/XFILES/lib/icons/undoMultiLineText.png" alt="Restore Value" border="0" width="16" height="16" onclick="doResetEditDescription(event);return false;"/>
                                    <span style="width:10px; display:inline-block;"/>
                                </span>
                                <img id="btnCancelDescription" src="/XFILES/lib/icons/cancel.png" alt="Cancel Operation" border="0" width="16" height="16" onclick="doCancelEditDescription(event);return false;"/>
                                <span style="width:10px; display:inline-block;"/>
                                <img id="btnUpdateDescription" src="/XFILES/lib/icons/saveAndClose.png" alt="Update Image Description" border="0" width="16" height="16" onclick="doSaveEditDescription(event);return false;"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

And the Xinha Editor is activated as follows

function doOpenEditDescription(evt) {

  if (descriptionUpdated) {
      document.getElementById("resetDescriptionOption").style.display = "inline-block";
  }
  else {
      document.getElementById("resetDescriptionOption").style.display = "none";
  }

    openPopupDialog(evt,"editDescriptionDialog");

    var editor = xinha_editors.xinhaDescriptionEditor;    
    editor.setHTML(editor.inwardHtml(contentToHTML.toText(currentDescription)));
  editor.activateEditor();    
  editor.focusEditor();

}

Note that once the Xinha Instance has been maximized and resotred it all works perfectly. And if I hide it and then expose it again without refreshing hte page it works perfectly. hAny ideas in why Xinha is not properly initialized the frst time it is used.

Last edited by mark_d_drake (2010-06-29 01:04:06)

Offline

#2 2010-06-29 03:27:46

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Help.. Xinha does not initialize correctly. Maximize fixes issues

You MUST have the Xinha display when it generates.  Once generated you can hide it.


James Sleeman

Offline

Board footer

Powered by FluxBB