Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6171 closed Bug (fixed)

Firefox scrolls to top of page when clicking on paragraph format drop-down list

Reported by: rydenius Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.4.3
Component: General Version: 3.3.2
Keywords: Firefox Cc:

Description

In #5981 and #6000 it has been reported for Chrome and Safari that page sometimes is scrolled to top when selecting paragraph format. Both these tickets are now closed, but the fix in r5785 only applies to WebKit browsers. But I can repeat the problem (or a very similar problem) with Firefox 3.0.17, which is very unlikely to benefit from the r5785 fix. The problem is intermittent and I have not found a 100% reliable way to reproduce the bug yet.

  • Go to http://ckeditor.com/demo
  • Scroll down page a bit
  • Scroll down editor area to the bottom
  • Click to set cursor after the last word in the last paragraph
  • Click on paragraph format select (which says Normal)

At the last click the full page is scrolled to top again. The problem can not be repeated until the page is fully reloaded again.

Environment: Ubuntu Linux, Firefox 3.0.17, CKEditor 3.3.2

Attachments (3)

6171.patch (637 bytes) - added by tobiasz.cudnik 6 years ago.
6171_2.patch (1.1 KB) - added by garry.yao 6 years ago.
6171_3.patch (574 bytes) - added by garry.yao 6 years ago.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 6 years ago by rydenius

I can also reproduce the bug according to the description above using Windows Vista and Firefox 3.6.8.

comment:2 Changed 6 years ago by krst

  • Status changed from new to confirmed
  • Version set to 3.3.2

Confirmed on Firefox 3.6.8, Windows 7

comment:3 Changed 6 years ago by Saare

  • Keywords Firefox added
  • Milestone set to CKEditor 3.4.1

comment:4 Changed 6 years ago by Saare

  • Status changed from confirmed to pending

I'm not able to reproduce the bug anymore on trunk.

comment:5 Changed 6 years ago by tobiasz.cudnik

WFM on FF 3.6 linux using demo site.

comment:6 Changed 6 years ago by garry.yao

  • Milestone CKEditor 3.4.2 deleted

comment:7 Changed 6 years ago by kinfora

I just encountered this for the first time after upgrading to CKEditor 3.4.2.

Flash video demonstrating the problem on Firefox 3.6.12. The video is with a bunch of Firefox extensions enabled but the same thing happens in safe mode.

comment:8 Changed 6 years ago by garry.yao

WFM following the steps in screencast on trunk with FF3.6.12/Windows7.

comment:9 Changed 6 years ago by fredck

  • Milestone set to CKEditor 3.5.1
  • Status changed from pending to confirmed

Confirmed with FF 3.6.12/Win7.

Note that the difference with previous issues with other browsers is that the main page is getting scrolled, not the contents iframe.

There is one detail though... it WFM with FF maximized... the issue happens if FF has a window size similar to the one in the screencast.

comment:10 Changed 6 years ago by fredck

  • Milestone changed from CKEditor 3.5.1 to CKEditor 3.4.3

Actually... confirmed with maximized window as well... I've just forgotten scrolling the main page down.

Looks like a quite serious issue.

comment:11 Changed 6 years ago by tobiasz.cudnik

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

Changed 6 years ago by tobiasz.cudnik

comment:12 Changed 6 years ago by tobiasz.cudnik

  • Status changed from assigned to review

The key to reproduce this issue is to not disable cache. The editor must be fully cached and sometimes couple of tries are needed. Also making a selection seems mandatory for me.

The attached patch seems to resolve the issue while still keeping the focus event fired in hosting document.

Reproduced on FF 3.5.9/win7 64b

comment:13 Changed 6 years ago by garry.yao

Great clue, while only reproducible for me on demo site? Could you attach the page you used to test locally?

comment:14 Changed 6 years ago by garry.yao

This bug takes time to reproduce and fix...the following pre-requirement must be met to reproduce it:

  1. Release code;
  2. Editor must be vertically over-flowed;
  3. CSS files must be all load from cache when opening, which cause it to be only stably reproduced on demo site;

comment:15 Changed 6 years ago by garry.yao

  • Status changed from review to review_failed

The patch doesn't work for me, actually out of our expectation it wasn't related to the focus moving logic, I'm providing a new patch here.

Changed 6 years ago by garry.yao

comment:16 Changed 6 years ago by tobiasz.cudnik

Unfortunately i'm still able to reproduce it with second patch after about 5th try using a remote webserver.

Changed 6 years ago by garry.yao

comment:17 Changed 6 years ago by garry.yao

  • Owner changed from tobiasz.cudnik to garry.yao
  • Status changed from review_failed to review

You're right, previous two patches both don't resolve the problem. The real culprit is when we put the panel at the top-left it scrolls the document. Considering the new change is happening on a hot line, #3535,#5565 should be checked also.

comment:18 Changed 6 years ago by tobiasz.cudnik

It works well now, but i think we should narrow this fix to FF or #3535 to IE.

comment:19 Changed 6 years ago by tobiasz.cudnik

  • Status changed from review to review_passed

comment:20 Changed 6 years ago by garry.yao

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

Fixed with [6114].

comment:21 Changed 6 years ago by rydenius

Pardon me asking, but does not r6114 equal the first of the three proposed patches which you dismissed as not working two days ago?

comment:22 Changed 6 years ago by garry.yao

Wrong patch [6114] reverted, committed with [6117].

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