summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/snippets.editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js/snippets.editor.js')
-rw-r--r--addons/web_editor/static/src/js/snippets.editor.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/snippets.editor.js b/addons/web_editor/static/src/js/snippets.editor.js
index 082a3b6204d..19f60a25741 100644
--- a/addons/web_editor/static/src/js/snippets.editor.js
+++ b/addons/web_editor/static/src/js/snippets.editor.js
@@ -500,6 +500,7 @@ data.Class = Widget.extend({
appendTo: 'body',
cursor: "move",
handle: ".oe_snippet_thumbnail",
+ distance: 30,
cursorAt: {
'left': left,
'top': top
@@ -553,7 +554,7 @@ data.Class = Widget.extend({
stop: function (ev, ui) {
$toInsert.removeClass('oe_snippet_body');
- if (! dropped && self.$editable.find('.oe_drop_zone') && ui.position.top > 3) {
+ if (! dropped && self.$editable.find('.oe_drop_zone') && ui.position.top > 3 && ui.position.left + 50 > self.$el.outerWidth()) {
var el = self.$editable.find('.oe_drop_zone').nearest({x: ui.position.left, y: ui.position.top}).first();
if (el.length) {
el.after($toInsert);