Hi,
I am seeing error with Kendo Editor : Uncaught TypeError: Cannot use 'in' operator to search for 'getSelection' in undefined. Editor loads and render fine. When text value is changed or updated in the editor in edit mode and then if I click outside of editor , js error is shown right away. Have tried calling refresh() on change event, that still gives me same error. If I call refresh on editor select event, it prevents the error, but won't let user type due to focus. Will have to click and hold the mouse down while typing to not lose focus instantly to use refresh method.
Browser: Chrome.
onEditorSelect: function (e) {
var editor = e.sender.element.closest('[data-role="editor"]').data('kendoEditor');
editor.refresh();
}
onEditorChange: function (e) {
var test = $(".page-editor").find("[data-role=editor]").data("kendoEditor");
test.refresh();
}
Stack Trace/Error
kendo.all.js:75062 Uncaught TypeError: Cannot use 'in' operator to search for 'getSelection' in undefined
at Object.selectionFromWindow (kendo.all.js:75062)
at Object.selectionFromDocument (kendo.all.js:75075)
at init.getSelection (kendo.all.js:73878)
at init.getRange (kendo.all.js:73886)
at init.refreshTools (kendo.all.js:76998)
at init.value (kendo.all.js:73799)
at init.refresh (kendo.all.js:9960)
at init.<
anonymous
> (kendo.all.js:9070)
at init.trigger (kendo.all.js:192)
at init.change (kendo.all.js:8900)
View
<
div
class
=
"page-editor"
data-bind
=
"visible: TestCheck"
>
<
textarea
data-role
=
"editor"
class
=
"editor"
id
=
"TestEditor"
style
=
"height: 100px;"
data-tools="['bold',
'italic'']"
data-bind="value: Text,
events: {
select: onEditorSelect,
select: onEditorChange
}">
</
textarea
>
</
div
>