summaryrefslogtreecommitdiff
path: root/addons/website/static/src
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-04-24 08:52:10 +0000
committerqsm-odoo <qsm@odoo.com>2020-05-25 08:41:49 +0000
commitf5e0727ca5d52d97dbe222623102895251fc763a (patch)
treee629bf765e50648c29e153147cbc2a99e596ce40 /addons/website/static/src
parent22449613141c5985f68a35d7ba0bc03386f28f96 (diff)
[FIX] web, *: fix keyboard overlay staying active when alt-tab/clicking
*: website The keyboard navigation mixin was initially only used in the web-client, because of this, some of the logic for hiding the overlay was put inside of the web-client. We recently made keyboard navigation available on website [1]. The handlers that would hide the overlay when alt-tabbing or clicking on the page were not registered. This commit fixes that by making the keyboard navigation mixin register the overlay-hiding handlers itself. [1]: https://github.com/odoo/odoo/commit/0b0690a3934cedcab0d5e34373e8d40c2ab25660 closes odoo/odoo#50122 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src')
-rw-r--r--addons/website/static/src/js/content/website_root.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/website/static/src/js/content/website_root.js b/addons/website/static/src/js/content/website_root.js
index dd2f54b72c1..af176cec1c0 100644
--- a/addons/website/static/src/js/content/website_root.js
+++ b/addons/website/static/src/js/content/website_root.js
@@ -38,6 +38,7 @@ var WebsiteRoot = publicRootData.PublicRoot.extend(KeyboardNavigationMixin, {
* @override
*/
start: function () {
+ KeyboardNavigationMixin.start.call(this);
// Compatibility lang change ?
if (!this.$('.js_change_lang').length) {
var $links = this.$('ul.js_language_selector li a:not([data-oe-id])');
@@ -57,6 +58,13 @@ var WebsiteRoot = publicRootData.PublicRoot.extend(KeyboardNavigationMixin, {
return this._super.apply(this, arguments);
},
+ /**
+ * @override
+ */
+ destroy() {
+ KeyboardNavigationMixin.destroy.call(this);
+ return this._super(...arguments);
+ },
//--------------------------------------------------------------------------
// Private