Bugfix. Modal auto-closes when you open it a second time
This commit is contained in:
parent
5532a9ec63
commit
87337eaeef
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
## 4.2.1 (Unreleased)
|
## 4.2.1 (Unreleased)
|
||||||
|
|
||||||
* Bugfix. Don't set `muc_domain` for roomspanel if `locked_muc_domain` is `true`.
|
* Bugfix: Don't set `muc_domain` for roomspanel if `locked_muc_domain` is `true`.
|
||||||
|
* Bugfix: Modal auto-closes when you open it for a second time.
|
||||||
|
|
||||||
## 4.2.0 (2019-04-04)
|
## 4.2.0 (2019-04-04)
|
||||||
|
|
||||||
|
7
dist/converse.js
vendored
7
dist/converse.js
vendored
@ -53173,6 +53173,7 @@ const _converse$env = _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_
|
|||||||
Strophe = _converse$env.Strophe,
|
Strophe = _converse$env.Strophe,
|
||||||
Backbone = _converse$env.Backbone,
|
Backbone = _converse$env.Backbone,
|
||||||
_ = _converse$env._;
|
_ = _converse$env._;
|
||||||
|
const u = _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].env.utils;
|
||||||
_converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].plugins.add('converse-modal', {
|
_converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].plugins.add('converse-modal', {
|
||||||
initialize() {
|
initialize() {
|
||||||
const _converse = this._converse;
|
const _converse = this._converse;
|
||||||
@ -53187,7 +53188,11 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_2__["default"].plugins
|
|||||||
if (!_.isNil(this.trigger_el)) {
|
if (!_.isNil(this.trigger_el)) {
|
||||||
this.trigger_el.classList.remove('selected');
|
this.trigger_el.classList.remove('selected');
|
||||||
}
|
}
|
||||||
}, false);
|
}, false); // XXX: Workaround for an apparent Bootstrap.Native bug, where
|
||||||
|
// the 'fade' class isn't removed after closing the modal,
|
||||||
|
// causing it to flash-close when you open it again.
|
||||||
|
|
||||||
|
this.el.addEventListener('shown.bs.modal', () => u.removeClass('fade', this.el), false);
|
||||||
},
|
},
|
||||||
|
|
||||||
insertIntoDOM() {
|
insertIntoDOM() {
|
||||||
|
@ -10,6 +10,7 @@ import converse from "@converse/headless/converse-core";
|
|||||||
import tpl_alert_modal from "templates/alert_modal.html";
|
import tpl_alert_modal from "templates/alert_modal.html";
|
||||||
|
|
||||||
const { Strophe, Backbone, _ } = converse.env;
|
const { Strophe, Backbone, _ } = converse.env;
|
||||||
|
const u = converse.env.utils;
|
||||||
|
|
||||||
|
|
||||||
converse.plugins.add('converse-modal', {
|
converse.plugins.add('converse-modal', {
|
||||||
@ -30,6 +31,11 @@ converse.plugins.add('converse-modal', {
|
|||||||
this.trigger_el.classList.remove('selected');
|
this.trigger_el.classList.remove('selected');
|
||||||
}
|
}
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
|
// XXX: Workaround for an apparent Bootstrap.Native bug, where
|
||||||
|
// the 'fade' class isn't removed after closing the modal,
|
||||||
|
// causing it to flash-close when you open it again.
|
||||||
|
this.el.addEventListener('shown.bs.modal', () => u.removeClass('fade', this.el), false);
|
||||||
},
|
},
|
||||||
|
|
||||||
insertIntoDOM () {
|
insertIntoDOM () {
|
||||||
|
Loading…
Reference in New Issue
Block a user