We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cf4a03 commit ee17caeCopy full SHA for ee17cae
1 file changed
frontend/src/modules/scaffold/backboneFormsOverrides.js
@@ -66,7 +66,20 @@ define([
66
Backbone.Form.editors.TextArea.prototype.render = function() {
67
textAreaRender.call(this);
68
69
- _.defer(function() {
+ function until(conditionFunction) {
70
+ const poll = resolve => {
71
+ if(conditionFunction()) resolve();
72
+ else setTimeout(_ => poll(resolve), 400);
73
+ }
74
+ return new Promise(poll);
75
76
+ function isAttached($element) {
77
+ return function() {
78
+ return Boolean($element.parents('body').length);
79
+ };
80
81
+
82
+ until(isAttached(this.$el)).then(function() {
83
this.editor = CKEDITOR.replace(this.$el[0], {
84
dataIndentationChars: '',
85
disableNativeSpellChecker: false,
0 commit comments