From 3b234a23cb3cf8b659f849c231fa3b2e160213b5 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 19 May 2016 12:03:44 +0200 Subject: [PATCH] [FIX] web: download file and editor firefox bug When we download a file (as can be done with attachments in Odoo), firefox is opening the link in current window but cancel the action once it is aware the resource is to be downloaded. But this get firefox into a corrupt state for some contenteditable features, for example document.queryCommandState which is needed for the editor will after downloading a file throw an error consistently instead of working as expected. It can be reproduced on firefox (at least from version 32 to 46) with the following snippet: https://jsfiddle.net/s246u3ay/3/ The issue is probably linked to the following reported issue since 2005: https://bugzilla.mozilla.org/show_bug.cgi?id=297494 This commit avoid the bug by opening attachments download links in a new window instead of the current one. closes #12109 opw-676918 --- addons/web/static/src/xml/base.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/web/static/src/xml/base.xml b/addons/web/static/src/xml/base.xml index 6049c64c9c0..ef57881d633 100644 --- a/addons/web/static/src/xml/base.xml +++ b/addons/web/static/src/xml/base.xml @@ -1064,7 +1064,7 @@ - + @@ -1079,7 +1079,7 @@