summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-06-17 16:53:21 +0200
committerDenis Ledoux <dle@odoo.com>2015-06-17 16:57:00 +0200
commit93e6b08e7c8fca959482a55f7314df48077d6403 (patch)
treede8518fa2bd93107c446a029659cc4700e142ba7 /addons
parent6009a83465c095632278c5ac1919f229e61d63f4 (diff)
[FIX] website: Edition with Firefox with CSS of external domains.
Firefox doesn't allow to access sheets cssRules In such a case, we just pass, these css rules will simply not be available for the edition of some inputs. Probably, when a real use case needing these external css rules will come, we will probably need to fetch these style sheets another way. opw-642752
Diffstat (limited to 'addons')
-rw-r--r--addons/website/static/src/js/website.editor.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 12dceabac8f..2d52d045280 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -2185,7 +2185,11 @@ define(['summernote/summernote'], function () {
}
var sheets = document.styleSheets;
for(var i = 0; i < sheets.length; i++) {
- var rules = sheets[i].rules || sheets[i].cssRules;
+ try {
+ var rules = sheets[i].rules || sheets[i].cssRules;
+ } catch(e) {
+ continue;
+ }
if (rules) {
for(var r = 0; r < rules.length; r++) {
var selectorText = rules[r].selectorText;