Opened 11 years ago

Last modified 10 years ago

#11468 new Bug

[iOS] Toolbar status doesn't update on iOS

Reported by: zacaway Owned by:
Priority: Normal Milestone:
Component: Core : Selection Version:
Keywords: iOS Cc:


Using current CKEditor standard editor demo on an iOS device (tested on iPad 2 with iOS 7.0.4):

  1. Position the cursor on the first word in the first paragraph ("Apollo") which is formatted bold.
  2. Observe the 'B' toolbar button is correctly show depressed.
  3. Move the cursor somewhere else in the paragraph that is not bold.
  4. Observe the 'B' toolbar button still shows bold, event though the cursor is not on bold text.

This problem seems to be consistent across all tools on the toolbar; they are not updating when the selection changes.

The problem seems to be that CKEditor is attaching to the DOM selectionchange event on the editable element (around selection.js:387) but according to, the selectionchange event is only valid when attached to the document object (not any element).

I've worked around this problem outside CKEditor using something like this, which fixes the problem:

this.editor.document.on('selectionchange', function () {
  var selection = this.editor.getSelection(),
    path = selection && new CKEDITOR.dom.elementPath(
    );'selectionChange', {
      selection: selection,
      path: path
  }, this);

Change History (3)

comment:1 Changed 10 years ago by Jakub Ś

Keywords: iOS added; ios toolbar removed
Version: 4.3.2

comment:2 Changed 10 years ago by Jakub Ś

Summary: Toolbar status doesn't update on iOS[iOS] Toolbar status doesn't update on iOS

comment:3 Changed 10 years ago by Piotr Jasiun

There is still problems with refreshing toolbar on CKEditor 4.4.6 and iOS 8.0.2.

Last edited 10 years ago by Piotr Jasiun (previous) (diff)
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