diff --git a/dev/View/Popup/Contacts.js b/dev/View/Popup/Contacts.js index c6646479c..efc9008fe 100644 --- a/dev/View/Popup/Contacts.js +++ b/dev/View/Popup/Contacts.js @@ -280,7 +280,7 @@ class ContactsPopupView extends AbstractViewNext { this.bBackToCompose = false; - hideScreenPopup(require('View/Popup/Contacts')); + hideScreenPopup(ContactsPopupView); switch (this.sLastComposeFocusedField) { diff --git a/vendors/ckeditor-plugins/plain/plugin.js b/vendors/ckeditor-plugins/plain/plugin.js index f3510ace7..635779af0 100644 --- a/vendors/ckeditor-plugins/plain/plugin.js +++ b/vendors/ckeditor-plugins/plain/plugin.js @@ -2,6 +2,26 @@ (function() { var + selectRange = function (el, start, end) { + if (!el) { + return; + } + if(end === undefined) { + end = start; + } + if('selectionStart' in el) { + el.selectionStart = start; + el.selectionEnd = end; + } else if(el.setSelectionRange) { + el.setSelectionRange(start, end); + } else if(el.createTextRange) { + var range = el.createTextRange(); + range.collapse(true); + range.moveEnd('character', end); + range.moveStart('character', start); + range.select(); + } + }, simplePlainToHtml = function (sPlain) { return sPlain .replace(/&/g, '&') @@ -50,10 +70,11 @@ hidpi: true, init: function(editor) { - if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE) + if (editor.elementMode === CKEDITOR.ELEMENT_MODE_INLINE) { return; + } - editor.__plainUtils = { + editor.__textUtils = { plainToHtml: function(data) { return window.rainloop_Utils_plainToHtml ? window.rainloop_Utils_plainToHtml(data, true) : simplePlainToHtml(data); @@ -94,11 +115,8 @@ editable.setData(editor.getData(1)); editor.__plain = editable; + editor.__textarea = textarea.$; - // Having to make