Opened 7 years ago

Closed 6 years ago

#6000 closed Bug (fixed)

Safari scrolls to top on initial click and headline formatting

Reported by: AndreU Owned by: fredck
Priority: Normal Milestone: CKEditor 3.4
Component: General Version: 3.3
Keywords: WebKit Cc:


You can reproduce it while going to the demo, scroll down to the end and click on the last paragraph. The focus will be set right but the editor window will scroll up. Same happens when going down to the last paragraph and make a headline out of a normal text.

This is totally annoying for long texts and in the case of headline it make the editing a pain, as you have to find you headline each time you create one :-(

Mac OS X 10.6.4 Safari 5.0

Attachments (2)

6000.patch (840 bytes) - added by Saare 6 years ago.
6000_2.patch (829 bytes) - added by fredck 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 7 years ago by Saare

  • Keywords Scroll removed
  • Status changed from new to confirmed

Looks like a browser bug.. need some investigation.

comment:2 Changed 6 years ago by AndreU

This was introduced in 3.3, in 3.2.2 it worked correctly. So rather a CKEditor bug. It seems that the position of the cursor does get lost.

comment:3 Changed 6 years ago by fredck

  • Milestone set to CKEditor 3.4

comment:4 Changed 6 years ago by kmonty

#5981 is related (the bug exists in Chrome as well)

comment:5 Changed 6 years ago by fredck

  • Keywords WebKit added; Safari removed

comment:6 Changed 6 years ago by Saare

  • Version changed from 3.3.1 to 3.3

Regression of [5391].

Changed 6 years ago by Saare

comment:7 Changed 6 years ago by Saare

  • Owner set to Saare
  • Status changed from confirmed to review

comment:8 Changed 6 years ago by fredck

  • Owner changed from Saare to fredck
  • Status changed from review to assigned

I've found the source of the issue. In fact, we're focusing the documentElement, which is not anymore the editable container, which is not <body>.

I'll come with a new patch for it.

Changed 6 years ago by fredck

comment:9 Changed 6 years ago by fredck

  • Status changed from assigned to review

The problem is created by code introduced with [5509] for #5713. That one was good for designMode, but now things changed with contenteditable.

It's enough to remove part of that code, which looks like not needed anymore. I've tested the patch with Chrome and Safari Windows and Mac, and it works well. I see no problems with selection being lost, not even with the focus and blur events.

comment:10 Changed 6 years ago by Saare

  • Status changed from review to review_passed

comment:11 Changed 6 years ago by fredck

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

Fixed with [5785].

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