[IMP] website, website_forum: add a class modal_shown on modal once css animation is completed
Use this new class in website_forum to avoid that the tour click during the animation and fail randomly. https://getbootstrap.com/docs/4.0/components/modal/#events
This commit is contained in:
@@ -11,3 +11,13 @@ weContext.get = function (context) {
|
||||
}, weGetContext(context), context);
|
||||
};
|
||||
});
|
||||
|
||||
odoo.define('website.website_modal', function (require) {
|
||||
'use strict';
|
||||
|
||||
require('web.dom_ready');
|
||||
|
||||
$('body').on('shown.bs.modal', function (e) {
|
||||
$(e.target).addClass('modal_shown');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -51,6 +51,7 @@ odoo.define("website_forum.tour_forum", function (require) {
|
||||
content: _t("Click to post your question."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
extra_trigger: 'div.modal.modal_shown',
|
||||
trigger: ".modal-header button.close",
|
||||
auto: true,
|
||||
}, {
|
||||
@@ -64,6 +65,7 @@ odoo.define("website_forum.tour_forum", function (require) {
|
||||
content: _t("Click to post your answer."),
|
||||
position: "bottom",
|
||||
}, {
|
||||
extra_trigger: 'div.modal.modal_shown',
|
||||
trigger: ".modal-header button.close",
|
||||
auto: true,
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user