this._content.classList.remove('collapsed');
- UiScroll.element(this._container, (function () {
- window.jQuery(this._textarea).redactor('WoltLabCaret.endOfEditor');
- }).bind(this));
+ this._focusEditor();
}
}).bind(this));
submitButton.addEventListener(WCF_CLICK_EVENT, this._submit.bind(this));
},
+ /**
+ * Scrolls the editor into view and sets the caret to the end of the editor.
+ *
+ * @protected
+ */
+ _focusEditor: function () {
+ UiScroll.element(this._container, (function () {
+ window.jQuery(this._textarea).redactor('WoltLabCaret.endOfEditor');
+ }).bind(this));
+ },
+
/**
* Submits the guest dialog.
*
// the error message can appear anywhere in the container, not exclusively after the textarea
var innerError = elBySel('.innerError', this._textarea.parentNode);
if (innerError !== null) elRemove(innerError);
+
+ this._content.classList.remove('collapsed');
+ this._focusEditor();
},
_getParameters: function () {