diff --git a/addons/mail/static/src/components/emojis_popover/emojis_popover.js b/addons/mail/static/src/components/emojis_popover/emojis_popover.js index 6d3798d0774..9259b24bee5 100644 --- a/addons/mail/static/src/components/emojis_popover/emojis_popover.js +++ b/addons/mail/static/src/components/emojis_popover/emojis_popover.js @@ -15,6 +15,26 @@ class EmojisPopover extends Component { this.emojis = emojis; } + + mounted() { + this._update(); + } + + patched() { + this._update(); + } + + //-------------------------------------------------------------------------- + // Private + //-------------------------------------------------------------------------- + + /** + * @private + */ + _update() { + this.trigger('o-popover-compute'); + } + //-------------------------------------------------------------------------- // Public //-------------------------------------------------------------------------- diff --git a/addons/web/static/src/js/core/popover.js b/addons/web/static/src/js/core/popover.js index 53e5b960e9c..28843d55d47 100644 --- a/addons/web/static/src/js/core/popover.js +++ b/addons/web/static/src/js/core/popover.js @@ -194,6 +194,16 @@ odoo.define('web.Popover', function () { this.state.displayed = false; } + /** + * Popover must recompute its position when children content changes. + * + * @private + * @param {Event} ev + */ + _onPopoverCompute(ev) { + this._compute(); + } + /** * A resize event will need to 'reposition' the popover close to its * target. diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 25099d03fa8..8b774d0daee 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -496,7 +496,7 @@ -
+