From 171d1e7bc3bf1df28c6c4aaf8e39abb3e0e9b75e Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Mon, 7 Jan 2019 10:43:40 +0000 Subject: [PATCH] [FIX] web_editor: Media dialog next btn reload page opw-1910505 Before this commit, the next button in the media dialog widget reloaded the page and opened only the iframe of the widget. Now, the button only update the media dialog widget. closes odoo/odoo#29981 --- addons/web_editor/static/src/js/widgets/widgets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/widgets/widgets.js b/addons/web_editor/static/src/js/widgets/widgets.js index 7c33ab53b97..30de8171e53 100644 --- a/addons/web_editor/static/src/js/widgets/widgets.js +++ b/addons/web_editor/static/src/js/widgets/widgets.js @@ -1288,6 +1288,7 @@ var MediaDialog = Dialog.extend({ * @private */ _onPagerClick: function (ev) { + ev.preventDefault(); this.active.goToPage(this.active.page + ($(ev.currentTarget).hasClass('previous') ? -1 : 1)); this._updateControlPanel(); },