Opened 9 years ago

Closed 9 years ago

#2320 closed Bug (fixed)

FF3: Find/Replace scrolls the entire page

Reported by: Frederico Caldeira Knabben Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.6.3
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Firefox3 IE Review+ Cc:

Description

Because the Find/Replace code uses the "scrollIntoView" function, the entire page gets scrolled when highlighting the found elements. This is the same problem we had with #2279 and #2319, so maybe the same solution used there can be used here too.

Attachments (2)

2320.patch (2.4 KB) - added by Martin Kou 9 years ago.
2320_2.patch (2.3 KB) - added by Martin Kou 9 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 9 years ago by Martin Kou

Milestone: FCKeditor 2.6.3
Owner: set to Martin Kou
Status: newassigned

Changed 9 years ago by Martin Kou

Attachment: 2320.patch added

comment:2 Changed 9 years ago by Martin Kou

Keywords: IE added

The problem happens in IE as well.

I changed the scrollIntoView() to FCKDomTools.ScrollIntoView(), as usual. But I've also made some changes to FCKDomTools.ScrollIntoView() to make it work correctly in IE, the current version doesn't work in IE because the scrolling coordinate it calculates becomes NaN.

comment:3 Changed 9 years ago by Martin Kou

Keywords: Review? added

comment:4 Changed 9 years ago by Frederico Caldeira Knabben

Everything looks good... just the fix at line 997 can be simplified:

-                       offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) ;
+                       offset += parseInt( this.GetCurrentElementStyle( element, 'marginBottom' ) || 0, 10 ) || 0 ; 

Review+ with the above change.

comment:5 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

Changed 9 years ago by Martin Kou

Attachment: 2320_2.patch added

comment:6 Changed 9 years ago by Martin Kou

Keywords: Review? added; Review- removed

comment:7 Changed 9 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:8 Changed 9 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

Fixed with [2159].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy