id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc 3901,Find scrollIntoView incorrect,Davey Shafik,,"An issue similar to #3692 for CKEditor 3.0, also exists in FCKEditor 2.6.x. When doing a Find, it will not scroll to the first item found, but the items thereafter are fine. When doing a Replace, it will not scroll to the first '''or second''' item found. I tested this using the demo on the FCK website. To replicate the find issue: 1) put some text at the top of the editor 2) hit enter enough times to scroll off the page 3) Search for the text at the top To replicate the replace issue: 1) Put some text at the top of the editor 2) Hit enter enough times to scroll off the page 3) enter the SAME text 4) Hit enter again enough times to scroll off the page 5) enter the SAME text a third time 6) then do a replace of that text. Looking into it, it seems that the first iteration, inside _Find, you don't have a FindRange, so you do this: {{{ #!js if ( !FindRange ) FindRange = new CharacterRange( new CharacterCursor( EditorDocument ), searchString.length ) ;} }}} Then, in {{{CharacterRange.Highlight}}} the line: {{{ #!js HighlightStyle.ApplyToRange( domRange, false, true ) ; }}} Seems to unset the {{{domRange.StartNode}}} (becomes {{{undefined}}}). This means that this throws an exception: {{{ #!js var charRange = CharacterRange.CreateFromDomRange( domRange ) ; }}} However, even if you capture the {{{StartNode}}} and put it back in place doing something like this: {{{ #!js Highlight : function() { if ( this._cursors.length < 1 ) return ; var domRange = this.ToDomRange() ; // First time through, the StartNode is lost this._highlightRange = domRange ; t = domRange.StartNode; HighlightStyle.ApplyToRange( domRange, false, true ) ; if (!domRange.StartNode) { domRange.StartNode = t; } var charRange = CharacterRange.CreateFromDomRange( domRange ) ; var focusNode = domRange.StartNode ; if ( focusNode.nodeType != 1 ) focusNode = focusNode.parentNode ; FCKDomTools.ScrollIntoView( focusNode, false ) ; this._cursors = charRange._cursors ; } }}} While it stops the exception, it still doesn't scroll. - Davey ",Bug,closed,Normal,,General,FCKeditor 2.6.4,wontfix,,