Opened 15 years ago

Closed 14 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@…

Description

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:1.9.1.3) 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)

ckeditorscrolls.zip (296.4 KB) - added by Martin Ørding-Thomsen 14 years ago.
example
tc_4472.html (549 bytes) - added by Frederico Caldeira Knabben 14 years ago.
Test case page.
4472.patch (1.2 KB) - added by Tobiasz Cudnik 14 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 15 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 14 years ago by Martin Ørding-Thomsen

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 14 years ago by Frederico Caldeira Knabben

Status: newpending

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

Changed 14 years ago by Martin Ørding-Thomsen

Attachment: ckeditorscrolls.zip added

example

comment:4 Changed 14 years ago by Martin Ørding-Thomsen

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 14 years ago by bomi

Cc: tbori@… added
Version: 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 14 years ago by Frédéric Arène

I tested several versions, this behaviour appeared in version 3.2.2

comment:7 Changed 14 years ago by Frederico Caldeira Knabben

Status: pendingnew
Version: 3.33.2.2

comment:8 Changed 14 years ago by Frédéric Arène

It comes from here (in trunk) http://dev.ckeditor.com/browser/CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js#L252 :

			// 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 14 years ago by Frederico Caldeira Knabben

Keywords: Firefox added
Status: newconfirmed

@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 14 years ago by Frederico Caldeira Knabben

Attachment: tc_4472.html added

Test case page.

comment:10 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4.1

This is a quite serious issue.

comment:11 Changed 14 years ago by Tobiasz Cudnik

Owner: set to Tobiasz Cudnik
Status: confirmedassigned

Changed 14 years ago by Tobiasz Cudnik

Attachment: 4472.patch added

comment:12 Changed 14 years ago by Tobiasz Cudnik

Status: assignedreview

comment:13 Changed 14 years ago by Sa'ar Zac Elias

Status: reviewreview_passed

comment:14 Changed 14 years ago by Tobiasz Cudnik

Resolution: fixed
Status: review_passedclosed

Fixed by [5873].

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