From b761c8fe0762f449bd6d9a1763c152833819247c Mon Sep 17 00:00:00 2001 From: qsm-odoo <qsm@odoo.com> Date: Fri, 4 Nov 2022 13:12:12 +0000 Subject: [PATCH] [FIX] website: prevent warning on each google map snippet initialization Some part of the google map API was deprecated and showed a warning at each snippet redraw. Probably harmless but since the related API are really capricious, best satisfy them as much as possible, even in stable versions. opw-2976261 Part-of: odoo/odoo#105072 --- addons/website/static/src/snippets/s_google_map/000.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/static/src/snippets/s_google_map/000.js b/addons/website/static/src/snippets/s_google_map/000.js index 1fa5d3d74aac..bdd7ba3396bc 100644 --- a/addons/website/static/src/snippets/s_google_map/000.js +++ b/addons/website/static/src/snippets/s_google_map/000.js @@ -66,7 +66,7 @@ publicWidget.registry.GoogleMap = publicWidget.Widget.extend({ map.setCenter(gps); // Update Map on screen resize - google.maps.event.addDomListener(window, 'resize', () => { + window.addEventListener('resize', () => { map.setCenter(gps); }); -- GitLab