Changeset 768 for trunk


Ignore:
Timestamp:
03/10/07 16:50:35 (12 years ago)
Author:
ray
Message:

Ticket #929 Save changes on page unload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/XinhaCore.js

    r767 r768  
    18331833 
    18341834  // add a handler for the "back/forward" case -- on body.unload we save 
    1835   // the HTML content into the original textarea. 
     1835  // the HTML content into the original textarea and restore it in its place. 
     1836  // apparently this does not work in IE? 
    18361837  Xinha.prependDom0Event( 
    18371838    window, 
     
    18401841    { 
    18411842      textarea.value = editor.outwardHtml(editor.getHTML()); 
     1843      var x = xinha.parentNode.replaceChild(textarea,xinha); 
     1844      // put it back into the page to let Xinha.collectGarbageForIE() do its work afterwards 
     1845      textarea.style.display = ""; 
     1846      x.style.display = 'none'; 
     1847      document.body.appendChild(x); 
    18421848      return true; 
    18431849    } 
Note: See TracChangeset for help on using the changeset viewer.