Created
May 15, 2013 16:28
-
-
Save mrfr0g/5585278 to your computer and use it in GitHub Desktop.
Fix for CKEDITOR 4.0 color palette button on iOS 6. Essentially CKEDITOR is trying to perform a lock/restore on the selection when it detects a blur event. Unfortunately this causes some "flashing" behavior on iOS when the browser tries to focus on the color button, then back on the editor, and landing finally on the body. This also results in t…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: selection.js | |
=================================================================== | |
--- selection.js (revision 39613) | |
+++ selection.js (revision 39615) | |
@@ -218,10 +218,12 @@ | |
else | |
editable.attachListener( editor, 'selectionCheck', saveSel, null, null, -1 ); | |
- editable.attachListener( editable, 'blur', function() { | |
- editor.lockSelection( lastSel ); | |
- restoreSel = 1; | |
- }, null, null, -1 ); | |
+ if(!CKEDITOR.env.iOS) { | |
+ editable.attachListener( editable, 'blur', function() { | |
+ editor.lockSelection( lastSel ); | |
+ restoreSel = 1; | |
+ }, null, null, -1 ); | |
+ } | |
// Disable selection restoring when clicking in. | |
editable.attachListener( editable, 'mousedown', function() { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment