diff --git a/src/converse-controlbox.js b/src/converse-controlbox.js index bc9eb4074..4b266ae6f 100644 --- a/src/converse-controlbox.js +++ b/src/converse-controlbox.js @@ -297,6 +297,9 @@ close: function (ev) { if (ev && ev.preventDefault) { ev.preventDefault(); } + if (_converse.sticky_controlbox) { + return; + } if (_converse.connection.connected && !_converse.connection.disconnecting) { this.model.save({'closed': true}); } else { @@ -315,6 +318,9 @@ }, hide: function (callback) { + if (_converse.sticky_controlbox) { + return; + } this.$el.addClass('hidden'); utils.refreshWebkit(); _converse.emit('chatBoxClosed', this); diff --git a/src/converse-inverse.js b/src/converse-inverse.js index 1259dc3e1..f2fa10b36 100644 --- a/src/converse-inverse.js +++ b/src/converse-inverse.js @@ -41,20 +41,6 @@ }, ControlBoxView: { - close: function (ev) { - if (ev && ev.preventDefault) { - ev.preventDefault(); - } - // The controlbox cannot be closed. - }, - - hide: function (ev) { - if (ev && ev.preventDefault) { - ev.preventDefault(); - } - // The controlbox cannot be hidden - }, - renderContactsPanel: function () { this.__super__.renderContactsPanel.apply(this, arguments); this.el.classList.remove("fullscreen");