diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2017-11-06 15:21:19 +0100 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2017-11-08 15:55:40 +0100 |
| commit | 9f0bc83788d0a137f8b2c02aaa2cb8ece6628b85 (patch) | |
| tree | fc97b82c828884b5b0837f1b974e8bba1e8b8ab3 /addons | |
| parent | abf8568879569ee18d5702ac677e82a45f7bc857 (diff) | |
[FIX] web: calendar IE9+ incompatibility
The "Event" API is not the same between IE9 till IE11 and all the other
browser (eg: IE Edge, google chrome, firefox, ...).
For example here is a seemingly accepted polyfill to have it working the
'same' on most browsers using CustomEvent:
https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill
This commit just trigger the event with jQuery which attains the same
result but work everywhere.
opw-780056
closes #20759
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/web/static/src/js/views/calendar/calendar_renderer.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/calendar/calendar_renderer.js b/addons/web/static/src/js/views/calendar/calendar_renderer.js index f011a24a32e..6283a3539f3 100644 --- a/addons/web/static/src/js/views/calendar/calendar_renderer.js +++ b/addons/web/static/src/js/views/calendar/calendar_renderer.js @@ -355,7 +355,7 @@ return AbstractRenderer.extend({ }, // Dirty hack to ensure a correct first render eventAfterAllRender: function () { - window.dispatchEvent(new Event('resize')); + $(window).trigger('resize'); }, viewRender: function (view) { // compute mode from view.name which is either 'month', 'agendaWeek' or 'agendaDay' |
