Changeset 501


Ignore:
Timestamp:
04/30/06 10:41:42 (11 years ago)
Author:
gogo
Message:

Applying ticket:446

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/plugins/EnterParagraphs/enter-paragraphs.js

    r419 r501  
    701701 
    702702        // NODE TYPE 11 is DOCUMENT_FRAGMENT NODE 
    703  
    704   if ( cnt.nodeType == 11 && !cnt.firstChild ) 
    705                 { 
    706                 cnt.appendChild(editor._doc.createElement(pify.nodeName)); 
    707                 } 
    708  
     703  // I do not profess to understand any of this, simply applying a patch that others say is good - ticket:446 
     704  if ( cnt.nodeType == 11 && !cnt.firstChild) 
     705  {      
     706    if (pify.nodeName != "BODY" || (pify.nodeName == "BODY" && pifyOffset != 0))  
     707    { //WKR: prevent body tag in empty doc 
     708      cnt.appendChild(editor._doc.createElement(pify.nodeName)); 
     709    } 
     710  } 
     711   
    709712        // YmL: Added additional last parameter for fill case to work around logic 
    710713        // error in forEachNode() 
Note: See TracChangeset for help on using the changeset viewer.