summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/snippets.editor.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index d0b6394ecd9..2353fcaee2f 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -726,20 +726,8 @@ data.Class = Widget.extend({
activate_overlay_zones: function ($targets) {
var self = this;
- function is_visible($el) {
- return $el.css('display') !== 'none'
- && $el.css('opacity') !== '0'
- && $el.css('visibility') !== 'hidden';
- }
-
// filter out invisible elements
- $targets = $targets.filter(function () { return is_visible($(this)); });
-
- // filter out elements with invisible parents
- $targets = $targets.filter(function () {
- var parents = $(this).parents().filter(function () { return !is_visible($(this)); });
- return parents.length === 0;
- });
+ $targets = $targets.filter(':visible:hasVisibility:hasOpacity');
$targets.each(function () {
var $target = $(this);