#13019 closed Bug (invalid)
Chrome: Unbale to get 'keydown' event
Reported by: | Irina | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | IBM | Cc: | Satya Minnekanti |
Description (last modified by )
Steps to reproduce:
- Open any sample in Chrome, clear it's content
- Run following in the console:
CKEDITOR.instances.[EDITOR_INSTANCE_ID].document.on('keydown', function(event) { console.log('KEYDOWN EVENT'); });
- Type few letters, e.g. abc.
- Result: console will print that keydown event occurred 3 times, e.g. (3)KEYDOWN EVENT
- Press enter key
- Result: key down event not detected and this is expected behaviour for this key
- press Backspace key
- Actual result: key down event not detected
Expected result: console will print that keydown event occurred 4 times, e.g. (4)KEYDOWN EVENT
Change History (6)
comment:1 Changed 10 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Version: | 4.4.7 |
comment:2 Changed 10 years ago by
I urgently require that this ticket be reopened and reinvestigated
Even when using the 'editable.on' for events we are still seeing issues with event handling being handled differently across browsers (IE, Chrome, FF). This seems to be particularly prevalent when the event selection deals with a HTML element (for example a Link, DIV, or NBSP element in the text). Often cursors go missing, and many times it will take several clicks for an action to be completed. Each browser seems to handle these issues in their own distinct way, as opposed to handling the same in each, as expected.
thanks, John
comment:3 Changed 10 years ago by
Please report a new issue and provide necessary details to reproduce it. From what you wrote it doesn't seem to be related to this issue, but I can't be sure, because the description you gave is a bit vague.
comment:4 Changed 10 years ago by
I am seeing an issue with key events not behaving correctly across browsers. I have tried both 'editor.document.on' and 'editable.on' as suggested above. Just as mentioned by Irina above, it seems as though I get different results based on which browser I am using, especially keyDown.
Also, I dont believe it is a different topic - in is related in the sense that it seems to be the same issue only it becomes much more noticeable when there is HTML (Links, DIVs, SPANs, etc...) elements in the text. In the event that I try to remove a HTML element using backspace/delete, often times in certain browsers it will require clicking twice to accomplish this, while in others I cannot remove the element at all. With keyboard arrow navigation often times the cursor seems to disappear when the selection reaches an element.
as odd as it sounds, (because the suggestion above suggests the opposite) - but I was actually seeing more consistent results using 'editor.document.on', whereas now with 'editable.on' I often can hit a key and see no debugs or no proof that the event even occurred.
comment:5 Changed 10 years ago by
Please read https://gist.github.com/Reinmar/9665f1630cd6287b4c2b. I hope that it helps. If not, please provide a sample which shows the issue.
comment:6 Changed 10 years ago by
Description: | modified (diff) |
---|
Please use below code: