Changes between Initial Version and Version 2 of Ticket #1005


Ignore:
Timestamp:
Aug 2, 2007, 4:37:29 AM (17 years ago)
Author:
Martin Kou
Comment:

The comments says the logic block around that pasteHTML() line is a kludge for a browser bug. I don't know how to reproduce that bug though, so I were to apply a fix here now, I have no way to be certain whether my fix would make that bug appear again. My proposed fix is as follows:

if ( bIsCollapsed )
{
  oIERange.moveEnd( 'character', 1 ) ;
  oIERange.select() ;
  oIERange.collapse( true ) ;
  oIERange.select() ;
}

If this does not work, how about this... instead of pasting a non-breaking space to expand the block in the try {...} block, we paste a <span> with a unique id there. Then we use DOM methods to remove it instead of using pasteHTML( '' ).

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1005 – Description

    initial v2  
    44
    55Debugging it, the problem is in internals/fckdomrange_ie.js
    6 before the oIERange.pasteHTML('') ; in line 118 the body contains the empty span (and sometimes and extra &nbsp; after or before it), but after it is executed the span is removed, so when it is returned to the plugin, the span isn't in the document and it won't be shown.
     6before the oIERange.pasteHTML(!'') ; in line 118 the body contains the empty span (and sometimes and extra &nbsp; after or before it), but after it is executed the span is removed, so when it is returned to the plugin, the span isn't in the document and it won't be shown.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy