| | 38 | |
| | 39 | // Kludge for #1592: if the bookmark nodes are in the beginning of blockquote, then move them |
| | 40 | // to the nearest block element in the blockquote. |
| | 41 | if ( FCKBrowserInfo.IsIE ) |
| | 42 | { |
| | 43 | var bStart = range.Window.document.getElementById( bookmark.StartId ) ; |
| | 44 | var bEnd = range.Window.document.getElementById( bookmark.EndId ) ; |
| | 45 | var nearestBlock = null ; |
| | 46 | |
| | 47 | if ( bStart && bStart.parentNode.nodeName.IEquals( 'blockquote' ) |
| | 48 | && bStart == bStart.parentNode.firstChild ) |
| | 49 | { |
| | 50 | var cursor = bStart ; |
| | 51 | while ( ( cursor = cursor.nextSibling ) ) |
| | 52 | { |
| | 53 | if ( FCKListsLib.BlockElements[cursor.nodeName.toLowerCase()] ) |
| | 54 | cursor.insertBefore( bStart.parentNode.removeChild( bStart ), cursor.firstChild ) ; |
| | 55 | } |
| | 56 | } |
| | 57 | |
| | 58 | if ( bEnd && bEnd.parentNode.nodeName.IEquals( 'blockquote' ) |
| | 59 | && bEnd == bEnd.parentNode.firstChild ) |
| | 60 | { |
| | 61 | var cursor = bEnd ; |
| | 62 | while ( ( cursor = cursor.nextSibling ) ) |
| | 63 | { |
| | 64 | if ( FCKListsLib.BlockElements[cursor.nodeName.toLowerCase()] ) |
| | 65 | { |
| | 66 | var insertPoint = cursor.firstChild ; |
| | 67 | if ( cursor.firstChild == bStart ) |
| | 68 | insertPoint = bStart.nextSibling ; |
| | 69 | cursor.insertBefore( bEnd.parentNode.removeChild( bEnd ), insertPoint ) ; |
| | 70 | } |
| | 71 | } |
| | 72 | } |
| | 73 | } |
| | 74 | |