Fix weird javascript error when setting editor content (#4781)

This commit is contained in:
Aleksander Machniak 2016-03-01 11:04:22 +01:00
parent 05b1c5c8b9
commit 7c3b2d646f

View file

@ -954,6 +954,7 @@ function rcube_kolab_notes_ui(settings)
if (!readonly && editor) { if (!readonly && editor) {
gui_object('notesdetailview', container).hide(); gui_object('notesdetailview', container).hide();
gui_object('noteseditform', container).show(); gui_object('noteseditform', container).show();
editor.setContent(''); // #4781
editor.setContent(html); editor.setContent(html);
node = editor.getContentAreaContainer().childNodes[0]; node = editor.getContentAreaContainer().childNodes[0];
if (node) node.tabIndex = content.get(0).tabIndex; if (node) node.tabIndex = content.get(0).tabIndex;