diff options
| author | stefanorigano (SRI) <sri@odoo.com> | 2020-09-15 10:32:15 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-09-22 17:20:03 +0000 |
| commit | 55424d41b355ae1303f040bdd953e357365289f3 (patch) | |
| tree | 928c5390be7f9257def1a33918429f09c7456278 /addons/web_editor/static/src/js/editor | |
| parent | fb8fbc879cdd27ba751f64f205d97e53c1a03559 (diff) | |
[FIX] web_editor, website: scroll effect dropdown
Fix the design. Trig animations hovering any part of the button rather
than its inner image only.
task-2335267
part-of: #57942
Diffstat (limited to 'addons/web_editor/static/src/js/editor')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.options.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index 54cef702bc2..40cfe0ebf93 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -234,12 +234,12 @@ const UserValueWidget = Widget.extend({ const buildImgExtensionSwitcher = (from, to) => { const regex = new RegExp(`${from}$`, 'i'); return ev => { - const img = ev.currentTarget; + const img = ev.currentTarget.getElementsByTagName("img")[0]; img.src = img.src.replace(regex, to); }; }; - this.$el.on('mouseenter.img_animate', 'img', buildImgExtensionSwitcher('png', 'gif')); - this.$el.on('mouseleave.img_animate', 'img', buildImgExtensionSwitcher('gif', 'png')); + this.$el.on('mouseenter.img_animate', buildImgExtensionSwitcher('png', 'gif')); + this.$el.on('mouseleave.img_animate', buildImgExtensionSwitcher('gif', 'png')); } }, /** |
