diff --git a/addons/im_livechat/static/src/legacy/public_livechat.js b/addons/im_livechat/static/src/legacy/public_livechat.js index 67d93ffab48..5a29d6e667f 100644 --- a/addons/im_livechat/static/src/legacy/public_livechat.js +++ b/addons/im_livechat/static/src/legacy/public_livechat.js @@ -110,6 +110,13 @@ var LivechatButton = Widget.extend({ if (this.options.button_text_color) { this.$el.css('color', this.options.button_text_color); } + + // If website_event_track_online installed, put the livechat banner above the PWA banner. + var pwaBannerHeight = $('.o_pwa_install_banner').outerHeight(true); + if (pwaBannerHeight) { + this.$el.css('bottom', pwaBannerHeight + 'px'); + } + return this._super(); }, diff --git a/addons/website_event_track_online/static/src/js/website_event_pwa_widget.js b/addons/website_event_track_online/static/src/js/website_event_pwa_widget.js index 15770c023dd..c50e9955c68 100644 --- a/addons/website_event_track_online/static/src/js/website_event_pwa_widget.js +++ b/addons/website_event_track_online/static/src/js/website_event_pwa_widget.js @@ -76,6 +76,7 @@ odoo.define("website_event_track_online.website_event_pwa_widget", function (req */ _hideInstallBanner: function () { this.installBanner ? this.installBanner.destroy() : undefined; + $('.o_livechat_button').css('bottom', '0'); }, /** @@ -102,7 +103,11 @@ odoo.define("website_event_track_online.website_event_pwa_widget", function (req */ _showInstallBanner: function () { this.installBanner = new PWAInstallBanner(this); - this.installBanner.appendTo(this.$el); + this.installBanner.appendTo(this.$el).then(() => { + // If Livechat available, It should be placed above the PWA banner. + var height = this.$('.o_pwa_install_banner').outerHeight(true); + $('.o_livechat_button').css('bottom', height + 'px'); + }); }, //--------------------------------------------------------------------------