Opened 11 days ago

Last modified 4 days ago

#16902 confirmed Bug

[iOS] CKEditor editing area scrolls incorrectly when inputting new characters on a scrolled page

Reported by: m-turek Owned by:
Priority: Normal Milestone:
Component: General Version:
Keywords: iOS Support Cc:


Steps to reproduce

  1. Open CKEditor sample on iOS, Safari. Editor should contain some text and be scrollable. There should be some content on the page above the editor so that whole page is also scrolled.
  2. Scroll the page down to see top of the editor.
  3. Tap on the beginning of editor's text.
  4. Input new characters.

NOTE: The issue appears to be native iOS issue as it can be reproduced without using CKEditor at all. See this code sample: The sample presents an iframe with 'contenteditable' body on a page with some text above the iframe. Follow the reproduction steps: 2-4. It is also worth noting that 'scroll' event is not fired on iframes on iOS. Also scrollTop property of an iframe cannot be set and is always equal 0. To workaround these problems iframe is wrapped in a div with fixed height and following css, which enables iframe scrolling:

overflow-y: auto;
-webkit-overflow-scrolling: touch;

Expected result

New characters appear in the editor. Editor is not scrolled. Input text is visible on screen.

Actual result

New characters are input however whole page and the editor is scrolled. Input text is not visible on screen due to wrong scroll position.

Other details (browser, OS, CKEditor version, installed plugins)

Problem has been checked in CKEditor 4.6.2, iOS 10.2, Safari 10.0

Change History (4)

comment:2 Changed 11 days ago by m-turek

comment:3 Changed 10 days ago by m-turek

Related bug on Webkit's bugzilla:

comment:4 Changed 8 days ago by j.swiderski

  • Status changed from new to confirmed

comment:5 Changed 4 days ago by m-turek

Workaround plugin for this issue, work in progress here: No unit tests, tried to simulate this bug with execCommand('insertText') but it doesn't reproduce that way. Only manual test is present because of that.

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