diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js index 1d8ec556e22..8a3b7a73d01 100644 --- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js +++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.js @@ -223,17 +223,6 @@ export class AttachmentViewer extends Component { this._stopDragging(); } - /** - * Called when clicking on previous icon. - * - * @private - * @param {MouseEvent} ev - */ - _onClickPrevious(ev) { - ev.stopPropagation(); - this.attachmentViewer.previous(); - } - /** * Called when clicking on print icon. * diff --git a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml index 89164a16c6f..b41ed6834ef 100644 --- a/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml +++ b/addons/mail/static/src/components/attachment_viewer/attachment_viewer.xml @@ -84,7 +84,7 @@ -
+
diff --git a/addons/mail/static/src/models/attachment_viewer.js b/addons/mail/static/src/models/attachment_viewer.js index 3208b83b5c8..e3b84d5a16d 100644 --- a/addons/mail/static/src/models/attachment_viewer.js +++ b/addons/mail/static/src/models/attachment_viewer.js @@ -91,6 +91,15 @@ registerModel({ ev.stopPropagation(); this.next(); }, + /** + * Called when clicking on previous icon. + * + * @param {MouseEvent} ev + */ + onClickPrevious(ev) { + ev.stopPropagation(); + this.previous(); + }, /** * Called when clicking on embed video player. Stop propagation to prevent * closing the dialog.