Ticket #2287: 2287_2.patch
File 2287_2.patch, 3.0 KB (added by , 17 years ago) |
---|
-
_whatsnew.html
61 61 for those who wish to force the #183 fix to be enabled.</li> 62 62 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2276">#2276</a>] [<a target="_blank" href="http://dev.fckeditor.net/ticket/2279">#2279</a>] On Opera 63 63 and Firefox 3, the entire page was scrolling on ENTER.</li> 64 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2287">#2287</a>] On some 65 specific cases, with Firefox 2, some extra spacing was appearing in the final HTML 66 on posting, if inserting two successive tables.</li> 67 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/2287">#2287</a>] Block 68 elements (like tables or horizontal rules) will be inserted correctly now when the 69 cursor is at the start or the end of blocks. No extra paragraphs will be included 70 in this operation.</li> 64 71 </ul> 65 72 <p> 66 73 </p> -
editor/_source/classes/fckdomrange.js
868 868 this.ExtractContents().AppendTo( oFixedBlock ) ; 869 869 FCKDomTools.TrimNode( oFixedBlock ) ; 870 870 871 // If the fixed block is empty (not counting bookmark nodes) 872 // Add a <br /> inside to expand it. 873 if ( FCKDomTools.CheckIsEmptyElement(oFixedBlock, function( element ) { return element.getAttribute('_fck_bookmark') != 'true' ; } ) 874 && FCKBrowserInfo.IsGeckoLike ) 875 FCKTools.AppendBogusBr( oFixedBlock ) ; 876 871 877 // Insert the fixed block into the DOM. 872 878 this.InsertNode( oFixedBlock ) ; 873 879 -
editor/_source/internals/fck.js
673 673 // object that may internally supply this feature. 674 674 var range = new FCKDomRange( this.EditorWindow ) ; 675 675 676 // Move to the selection and delete it. 677 range.MoveToSelection() ; 678 range.DeleteContents() ; 679 676 680 if ( FCKListsLib.BlockElements[ elementName ] != null ) 677 681 { 678 range.SplitBlock() ; 682 if ( range.StartBlock ) 683 { 684 if ( range.CheckStartOfBlock() ) 685 range.MoveToPosition( range.StartBlock, 3 ) ; 686 else if ( range.CheckEndOfBlock() ) 687 range.MoveToPosition( range.StartBlock, 4 ) ; 688 else 689 range.SplitBlock() ; 690 } 691 679 692 range.InsertNode( element ) ; 680 693 681 694 var next = FCKDomTools.GetNextSourceElement( element, false, null, [ 'hr','br','param','img','area','input' ], true ) ; … … 705 718 } 706 719 else 707 720 { 708 // Delete the current selection and insert the node. 709 range.MoveToSelection() ; 710 range.DeleteContents() ; 721 // Insert the node. 711 722 range.InsertNode( element ) ; 712 723 713 724 // Move the selection right after the new element.