11/08/09 05:06:56 (10 years ago)

Ticket #1387

  • modules/insertImage/pluginMethods.js already fixed at some point
  • modules/InternetExplorer/InternetExplorer.js I've added in the patch, if it's preventing a crash I see no good reason to with-hold
  • plugins/ContextMenu/ContextMenu.js - patch not applied, _insertImage() is correct I think
  • plugins/ContextMenu/menu.css - patch applied, can't see any harm
  • popups/editor_help.html - patch applied, agree for the end user "Editor" is better than "Xinha"
  • XinhaCore?.js - saveas button patch applied, missing return applied, removal of "false" not applied, I don't think the return is checked anywhere anyway so no need to change, GET vs HEAD already dealt with in #1429
1 edited


  • trunk/modules/InternetExplorer/InternetExplorer.js

    r1173 r1198  
    453453  if (!savedSelection) return; 
     455  // Ticket #1387 
     456  // avoid problem where savedSelection does not implement parentElement().  
     457  // This condition occurs if there was no text selection at the time saveSelection() was called.  In the case  
     458  // an image selection, the situation is confusing... the image may be selected in two different ways:  1) by  
     459  // simply clicking the image it will appear to be selected by a box with sizing handles; or 2) by clicking and  
     460  // dragging over the image as you might click and drag over text.  In the first case, the resulting selection  
     461  // object does not implement parentElement(), leading to a crash later on in the code below.  The following  
     462  // hack avoids that problem.  
     463  if (!savedSelection.parentElement)  
     464  { 
     465    return; 
     466  }  
    454468  // In order to prevent triggering the IE bug mentioned below, we will try to 
    455469  // optimize by not restoring the selection if it happens to match the current 
Note: See TracChangeset for help on using the changeset viewer.