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: |
Description
Using current CKEditor standard editor demo on an iOS device (tested on iPad 2 with iOS 7.0.4):
- Position the cursor on the first word in the first paragraph ("Apollo") which is formatted bold.
- Observe the 'B' toolbar button is correctly show depressed.
- Move the cursor somewhere else in the paragraph that is not bold.
- 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 http://help.dottoro.com/ljixpxji.php, 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( selection.getStartElement(), selection.root ); this.editor.fire('selectionChange', { selection: selection, path: path }); }, this);
Change History (3)
comment:1 Changed 11 years ago by
Keywords: | iOS added; ios toolbar removed |
---|---|
Version: | 4.3.2 |
comment:2 Changed 11 years ago by
Summary: | Toolbar status doesn't update on iOS → [iOS] Toolbar status doesn't update on iOS |
---|
There are still problems with refreshing toolbar on CKEditor 4.4.6 and iOS 8.0.2.