Index: /FCKeditor/trunk/_whatsnew.html
===================================================================
--- /FCKeditor/trunk/_whatsnew.html (revision 1125)
+++ /FCKeditor/trunk/_whatsnew.html (revision 1126)
@@ -139,4 +139,6 @@
the issue where empty paragraphs are added around page breaks each time the user
switches to Source mode.
+
[#1578] The editor
+ will now scroll correctly when hitting enter in front of a paragraph.
Index: /FCKeditor/trunk/editor/_source/classes/fckenterkey.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckenterkey.js (revision 1125)
+++ /FCKeditor/trunk/editor/_source/classes/fckenterkey.js (revision 1126)
@@ -492,10 +492,10 @@
// Move the selection to the new block.
oRange.MoveToElementEditStart( bIsStartOfBlock && !bIsEndOfBlock ? eNextBlock : eNewBlock ) ;
-
- if ( FCKBrowserInfo.IsSafari )
- FCKDomTools.ScrollIntoView( eNewBlock, false ) ;
- else if ( FCKBrowserInfo.IsGeckoLike )
- eNewBlock.scrollIntoView( false ) ;
- }
+ }
+
+ if ( FCKBrowserInfo.IsSafari )
+ FCKDomTools.ScrollIntoView( eNextBlock || eNewBlock, false ) ;
+ else if ( FCKBrowserInfo.IsGeckoLike )
+ ( eNextBlock || eNewBlock ).scrollIntoView( false ) ;
oRange.Select() ;