Commit 8c708b5f authored by JC Brand's avatar JC Brand

Focus textarea when switching between rooms

parent d92a7428
......@@ -58903,15 +58903,16 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
u.showElement(this.el);
},
openRoom(ev) {
async openRoom(ev) {
ev.preventDefault();
const name = ev.target.textContent;
const jid = ev.target.getAttribute('data-room-jid');
const data = {
'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid
};
await _converse.api.rooms.open(jid, data);
_converse.api.rooms.open(jid, data);
_converse.api.chatviews.get(jid).focus();
},
closeRoom(ev) {
......@@ -212,14 +212,15 @@ converse.plugins.add('converse-roomslist', {
u.showElement(this.el);
},
openRoom (ev) {
async openRoom (ev) {
ev.preventDefault();
const name = ev.target.textContent;
const jid = ev.target.getAttribute('data-room-jid');
const data = {
'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid
}
_converse.api.rooms.open(jid, data);
await _converse.api.rooms.open(jid, data);
_converse.api.chatviews.get(jid).focus();
},
closeRoom (ev) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment