From 831a1bdac340871c099dbc3ad504febeb1a37f3c Mon Sep 17 00:00:00 2001
From: Christophe Matthieu <chm@odoo.com>
Date: Fri, 19 Sep 2014 12:13:02 +0200
Subject: [PATCH] [FIX] website: remove multi consecutive dropzone

---
 addons/website/static/src/js/website.snippets.editor.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index 116f55713ec9..eeb8261217c8 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -550,12 +550,17 @@
                 $zones.remove();
             } while (count > 0);
 
-            // Cleaning up zones placed between floating or inline elements. We do not like these kind of zones.
+            // Cleaning consecutive zone and up zones placed between floating or inline elements. We do not like these kind of zones.
             var $zones = self.$wrapwrap.find('.oe_drop_zone:not(.oe_vertical)');
             $zones.each(function (){
                 var zone = $(this);
                 var prev = zone.prev();
                 var next = zone.next();
+                // remove consecutive zone
+                if (!zone.hasClass('.oe_vertical') && (prev.is('.oe_drop_zone:not(.oe_vertical)') || next.is('.oe_drop_zone:not(.oe_vertical)'))) {
+                    zone.remove();
+                    return;
+                }
                 var float_prev = prev.css('float')   || 'none';
                 var float_next = next.css('float')   || 'none';
                 var disp_prev  = prev.css('display') ||  null;
-- 
GitLab