replyButton.addEventListener("click", (event) => {
event.preventDefault();
- this._getEditor().WoltLabReply.showEditor();
+ this._getEditor().WoltLabReply.showEditor(true);
UiScroll.element(this._container, () => {
this._getEditor().WoltLabCaret.endOfEditor();
_messageContent.addEventListener('click', _callbackClick);
},
- showEditor: function () {
+ showEditor: function (skipFocus = false) {
if (!_messageQuickReply) {
// direct api call, but conditions are not met, be graceful
- this.WoltLabCaret.endOfEditor();
+ if (!skipFocus) {
+ this.WoltLabCaret.endOfEditor();
+ }
+
return;
}
else if (!_messageQuickReply.classList.contains('messageQuickReplyCollapsed')) {
_messageQuickReply.classList.remove('messageQuickReplyCollapsed');
_messageContent.removeEventListener('click', _callbackClick);
- this.WoltLabCaret.endOfEditor();
+ if (!skipFocus) {
+ this.WoltLabCaret.endOfEditor();
+ }
},
_click: function (event) {
document.querySelectorAll(".jsQuickReply").forEach((replyButton) => {
replyButton.addEventListener("click", (event) => {
event.preventDefault();
- this._getEditor().WoltLabReply.showEditor();
+ this._getEditor().WoltLabReply.showEditor(true);
UiScroll.element(this._container, () => {
this._getEditor().WoltLabCaret.endOfEditor();
});