Opened 11 years ago
Closed 10 years ago
#10926 closed Bug (fixed)
[Android][Chrome]CKEditor 4.2 'change' event not fired on Android (Chrome or Native)
Reported by: | Chris Ingham | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.4 |
Component: | Core : Editable | Version: | 4.2.1 |
Keywords: | Android | Cc: | chris.ingham@… |
Description (last modified by )
Updated our project to use the version 4.2 'change' event (ticket 9794), and all seemed fine until we discovered the event is not fired on Android Chrome or the native Android Webkit browser.
Can reproduce on either the demo#inline or nightly inlineall.html versions via the developer tools console:
CKEDITOR.instances.editor1.on('focus', function(){console.log("Focused!");}); CKEDITOR.instances.editor1.on('change', function(){console.log("Changed!");});
This works great on Firefox, Chrome on desktop (Windows 8), but I only see the "Focused!" output on Android (connected to a Nexus 7 using ADB, also seen on a Galaxy Tab 10.1 and a 1st-gen Asus Transformer)
Part of: #11739.
Change History (15)
comment:1 Changed 11 years ago by
Keywords: | Android added |
---|
comment:2 Changed 11 years ago by
comment:3 Changed 11 years ago by
Change is not fired properly because the keypress event is used in the code. Keypress is not supported by Android and some other mobile browsers (e.g. Windows).
I created a ticket to replace keypress generally with other events: http://dev.ckeditor.com/ticket/11575
For my application which uses CKEditor I use an alternative approach. I created a plugin which checks periodically if the content has changed by creating a checksum. So I got rid of the event problems.
comment:4 Changed 11 years ago by
@bjoerne in such cases please don't create duplicate tickets. It is enough to add new comment. I have moved your comment here:
According the official W3C specification the event 'keypress' is deprecated (http://www.w3.org/TR/DOM-Level-3-Events/#event-type-keypress). Some modern mobile browsers (Android, Windows) don't support this event. Alternative events are keydown, keyup, input or textInput (supported by some browsers but not specified), beforeinput (specified but not supported by browsers).
CKEditor uses keypress at some places and causes problems on mobile devices. One place is the UndoManager (plugins/undo/plugin.js) so that the 'change' event isn't fired properly on mobile devices.
editor.editable().on( 'keypress', function( event ) { undoManager.type( event.data.getKey(), 1 ); } );
comment:7 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:8 Changed 11 years ago by
Summary: | CKEditor 4.2 'change' event not fired on Android (Chrome or Native) → [Android][Chrome]CKEditor 4.2 'change' event not fired on Android (Chrome or Native) |
---|
comment:9 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:10 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:11 Changed 11 years ago by
Milestone: | → CKEditor 4.4.2 |
---|
comment:12 Changed 11 years ago by
Milestone: | CKEditor 4.4.2 → CKEditor 4.4.3 |
---|
As part of #11739 this ticket needs to be postponed too (http://dev.ckeditor.com/ticket/11739#comment:17).
comment:13 Changed 11 years ago by
Milestone: | CKEditor 4.4.3 → CKEditor 4.4.4 |
---|
The 4.4.3 milestone was shortened, so the remaining tickets must be postponed.
comment:14 Changed 10 years ago by
Change event works fine with 4.4.4 master branch. I have tested it on Android 4.4.2 with Chrome 35. Tested both classic and inline editors.
comment:15 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
Thanks. So this issue was fixed in #11739.
Still seeing on 4.3.1
Slight changes to duplicating on the demo#inline page:
CKEDITOR.instances.editor2.on('focus', function(){console.log("Focused!");}); CKEDITOR.instances.editor2.on('blur', function(){console.log("Blurred!");}); CKEDITOR.instances.editor2.on('change', function(){console.log("Changed!");});
Connect Android device to a desktop using ADB - you'll see "Focused!" and "Blurred!" but no "Changed!" events as you add text (Although you DO see "Changed!" when you press Backspace!)
Although it looks like you still don't officially support it, CKEditor mostly works on Android. This, however, is fairly serious. Is there any chance of getting the priority bumped???