Search code examples
javascriptckeditorckeditor4.x

Uncaught TypeError: Cannot read property 'clientTop' of undefined - CKEDITOR 4.112


A. Provide detailed reproduction steps (if any) 1. Write some text 2. Select all and set align center/right/justified

B. Expected result Back focus at end of text

C. Actual result When set cursor at end or else of the text, cursor back again to first line and can't set the focus. except we set first line align to left, the editor will normal again

Uncaught TypeError: Cannot read property 'clientTop' of undefined at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.element.getDocumentPosition (ckeditor.js:114) at z (ckeditor.js:1018) at y (ckeditor.js:1020) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.element.mouseNear (ckeditor.js:1007) at ckeditor.js:1025

ckeditor issues here https://github.com/ckeditor/ckeditor4/issues/3635


Solution

  • This problem because i set interval to get onChange value from ckeditor, this is wrong way. ckeditor has own onChange handler