Opened 17 years ago

Closed 16 years ago

Last modified 16 years ago

#1418 closed Bug (fixed)

FCKToolbarSet Detached Toolbar Flicker

Reported by: Scott McNaught Owned by:
Priority: Normal Milestone: FCKeditor 2.5
Component: UI : Toolbar Version: SVN (FCKeditor) - Retired
Keywords: HasPatch Cc:

Description

When the toolbar is detached, and using the IFRAME mode, the toolbar can flicker on load as as it adjusts its size. There is a browser hack which adjusts the frame height using setTimeout() with a delay of 1 second,

I beleive the way that this is implemented could be improved.

The code is: window.onload = function () {adjust(); window.setTimeout( adjust, 1000 ); }

  • The initial call to adjust() is not needed as when it adjusts, on most browsers it adjusts to the wrong size anyway (causing flicker)
  • There does not appear to be a need for the 1000ms delay (calling it via setTimeout ensures anyway that the DOM has been fully constructed before calling the function)

I suggest that this be changed to simply:

window.setTimeout( adjust, 0 );

I have attached a patch.

Attachments (1)

patch.txt (1.2 KB) - added by Scott McNaught 17 years ago.

Download all attachments as: .zip

Change History (5)

Changed 17 years ago by Scott McNaught

Attachment: patch.txt added

comment:1 Changed 17 years ago by Alfonso Martínez de Lizarrondo

That code is present to fix #272

comment:2 Changed 17 years ago by Scott McNaught

It seems like calling the adjust method via setTimeout() fixes #272 (from my testing).

My suggestion is to remove the initial adjust() which adjusts to the wrong position, and to remove the 1 second delay.

comment:3 Changed 16 years ago by Alfonso Martínez de Lizarrondo

Milestone: FCKeditor 2.5
Resolution: fixed
Status: newclosed

I've tested right now (sorry for the delay) and it seems that you are right. I think that I already did test initially with a 0 delay, but I might be wrong.

Commited [1070], thank you.

comment:4 Changed 16 years ago by Scott McNaught

Thanks a lot.

Scott

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy