Commit 12989ab2 authored by JC Brand's avatar JC Brand

New event: `chatBoxBlurred`

parent 86f3399d
......@@ -13,6 +13,7 @@
- Replace `moment` with [DayJS](https://github.com/iamkun/dayjs).
- New API method [\_converse.api.disco.features.get](https://conversejs.org/docs/html/api/-_converse.api.disco.features.html#.get)
- New config setting [muc_show_disconnection_status](https://conversejs.org/docs/html/configuration.html#muc-show-disconnection-status)
- New event: `chatBoxBlurred`.
- #1296: `embedded` view mode shows `chatbox-navback` arrow in header
- #1465: When highlighting a roster contact, they're incorrectly shown as online
- #1532: Converse reloads on enter pressed in the filter box
......
......@@ -415,6 +415,15 @@ converse.plugins.add('converse-chatview', {
}));
const textarea_el = this.el.querySelector('.chat-textarea');
textarea_el.addEventListener('focus', () => this.emitFocused());
textarea_el.addEventListener('blur', () => {
/**
* Triggered when the focus has been removed from a particular chat.
* @event _converse#chatBoxBlurred
* @type { _converse.ChatBoxView | _converse.ChatRoomView }
* @example _converse.api.listen.on('chatBoxBlurred', view => { ... });
*/
_converse.api.trigger('chatBoxBlurred', this);
});
this.renderToolbar();
},
......
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