diff --git a/converse.js b/converse.js index a519b7bca..2f188b8d4 100644 --- a/converse.js +++ b/converse.js @@ -1318,6 +1318,7 @@ // Toggle drag resize ability this.$el.find('.dragresize-tm').toggle(); this.setChatBoxHeight(this.height); + converse.emit('onChatBoxToggled', this); }, updateVCard: function () { diff --git a/docs/source/index.rst b/docs/source/index.rst index 06388f70a..fb8f044a2 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -805,6 +805,12 @@ Here are the different events that are emitted: Triggered whenever the roster view (i.e. the rendered HTML) has changed. +* **onChatBoxClosed** + + ``converse.on('onChatBoxClosed', function (chatbox) { ... });`` + + Triggered when a chat box has been closed. + * **onChatBoxFocused** ``converse.on('onChatBoxFocused', function (chatbox) { ... });`` @@ -817,11 +823,11 @@ Here are the different events that are emitted: Triggered when a chat box has been opened. -* **onChatBoxClosed** +* **onChatBoxToggled** - ``converse.on('onChatBoxClosed', function (chatbox) { ... });`` + ``converse.on('onChatBoxToggled', function (chatbox) { ... });`` - Triggered when a chat box has been closed. + Triggered when a chat box has been minimized or maximized. * **onStatusChanged**