[FIX] website: ignore SVG elements when looking for edition events in RTE
authorXavier Morel <xmo@openerp.com>
Thu, 19 Jun 2014 09:39:14 +0000 (11:39 +0200)
committerXavier Morel <xmo@openerp.com>
Thu, 19 Jun 2014 09:39:14 +0000 (11:39 +0200)
addons/website/static/src/js/website.editor.js

index 6ed5f11..0a4ed5e 100644 (file)
         //       a/@href, ...)
         _(mutations).chain()
             .filter(function (m) {
+                // ignore any SVG target, these blokes are like weird mon
+                if (m.target && m.target instanceof SVGElement) {
+                    return false;
+                }
+
                 // ignore any change related to mundane image-edit-button
                 if (m.target && m.target.className
                         && m.target.className.indexOf('image-edit-button') !== -1) {