Ticket #2320 (closed Bug: fixed)

Opened 5 months ago

Last modified 5 months ago

FF3: Find/Replace scrolls the entire page

Reported by: fredck Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.6.3
Component: General Version: SVN
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

2320.patch (2.4 KB) - added by martinkou 5 months ago.
2320_2.patch (2.3 KB) - added by martinkou 5 months ago.

Change History

Changed 5 months ago by martinkou

  • owner set to martinkou
  • status changed from new to assigned
  • milestone set to FCKeditor 2.6.3

Changed 5 months ago by martinkou

Changed 5 months ago by martinkou

  • 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.

Changed 5 months ago by martinkou

  • keywords Review? added

Changed 5 months ago by fredck

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.

Changed 5 months ago by fredck

  • keywords Review- added; Review? removed

Changed 5 months ago by martinkou

Changed 5 months ago by martinkou

  • keywords Review? added; Review- removed

Changed 5 months ago by fredck

  • keywords Review+ added; Review? removed

Changed 5 months ago by martinkou

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with [2159].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.