Opened 8 years ago

Closed 7 years ago

#4472 closed Bug (fixed)

[FF3] Browserwindow scrolls to loaded ckEditor

Reported by: Partout Owned by: tobiasz.cudnik
Priority: Normal Milestone: CKEditor 3.4.1
Component: General Version: 3.2.2
Keywords: Firefox Cc: tbori@…


When having multiple ckEditors in a HTML-page with so many content it is scrollable, the browserwindow jumps to the last loaded ckEditor.

This problem occurs in Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv: Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)

Used version ckEditor: ckEditor 3.0

Seems to work fine in IE7 though.

Attachments (3) (296.4 KB) - added by martinording 7 years ago.
tc_4472.html (549 bytes) - added by fredck 7 years ago.
Test case page.
4472.patch (1.2 KB) - added by tobiasz.cudnik 7 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 8 years ago by Partout

Update: I found this only occurs when an empty ckEditor is loaded. If there is content in every ckEditor (ie the value of the to be replaced textarea is filled) there is no scrolling.

comment:2 Changed 7 years ago by martinording

This bug is still present. I'm using FF 3.6.6 (Windows) and CKEditor 3.3.1. It occurs regardless of using class="ckeditor" or CKEDITOR.replace.

comment:3 Changed 7 years ago by fredck

  • Status changed from new to pending

Could you please attach a test page that shows as the problem?

Changed 7 years ago by martinording


comment:4 Changed 7 years ago by martinording

Done. It turns out that it only happens when config.contentsCss is set. It doesnt matter if the file actually exists or not.

comment:5 Changed 7 years ago by bomi

  • Cc tbori@… added
  • Version set to 3.3

Nope. It happens (perhaps can be reproduced more often on a slow machine), regardless of the config.contentsCss setting. Practically it scrolls all the way down to the editor with an empty config.js too (in Firefox 3.6, tested with the 3.3 version of the CKEditor). On the other hand, that's true that it won't scroll when there is anything (other than whitespace) in the textarea/editor. (Possibly a focus problem?) A minimal html (with a ckeditor tree below, with an empty config.js) can be used to reproduce the problem: <html> <head> <title>Firefox CKEditor unwanted scroll test page</title> <script src="ckeditor/ckeditor.js"></script> </head> <body> <p style="height:9000px;">a</p> <form><textarea name="c" class="ckeditor"></textarea></form> </body> </html>

comment:6 Changed 7 years ago by gillup

I tested several versions, this behaviour appeared in version 3.2.2

comment:7 Changed 7 years ago by fredck

  • Status changed from pending to new
  • Version changed from 3.3 to 3.2.2

comment:8 Changed 7 years ago by gillup

It comes from here (in trunk) :

			// Simulating keyboard character input by dispatching a keydown of white-space text.
			var keyEventSimulate = doc.$.createEvent( "KeyEvents" );
			keyEventSimulate.initKeyEvent( 'keypress', true, true, win.$, false,
				false, false, false, 0, 32 );
			doc.$.dispatchEvent( keyEventSimulate );

comment:9 Changed 7 years ago by fredck

  • Keywords Firefox added
  • Status changed from new to confirmed

@gillup, your findings pointed us to the precise requirement to reproduce this issue: the editor must be empty on load. No other factors are involved.

I have reproduced the problem by simply removing the contents to be loaded with the replacebyclass sample. I'll attach it here.

Changed 7 years ago by fredck

Test case page.

comment:10 Changed 7 years ago by fredck

  • Milestone set to CKEditor 3.4.1

This is a quite serious issue.

comment:11 Changed 7 years ago by tobiasz.cudnik

  • Owner set to tobiasz.cudnik
  • Status changed from confirmed to assigned

Changed 7 years ago by tobiasz.cudnik

comment:12 Changed 7 years ago by tobiasz.cudnik

  • Status changed from assigned to review

comment:13 Changed 7 years ago by Saare

  • Status changed from review to review_passed

comment:14 Changed 7 years ago by tobiasz.cudnik

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed by [5873].

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