diff --git a/addons/web/static/src/core/dialog/dialog.js b/addons/web/static/src/core/dialog/dialog.js index 0f2d75a0a44..f9bbefbc757 100644 --- a/addons/web/static/src/core/dialog/dialog.js +++ b/addons/web/static/src/core/dialog/dialog.js @@ -15,6 +15,16 @@ export class Dialog extends Component { }); this.id = `dialog_${this.data.id}`; useChildSubEnv({ inDialog: true, dialogId: this.id }); + + owl.onWillDestroy(() => { + if (this.env.isSmall) { + this.data.scrollToOrigin(); + } + }); + } + + get isFullscreen() { + return this.props.fullscreen || this.env.isSmall; } } Dialog.template = "web.Dialog"; diff --git a/addons/web/static/src/core/dialog/dialog.xml b/addons/web/static/src/core/dialog/dialog.xml index 048a104399f..9925618ea71 100644 --- a/addons/web/static/src/core/dialog/dialog.xml +++ b/addons/web/static/src/core/dialog/dialog.xml @@ -5,16 +5,21 @@