From: Aleksander Ɓukasz Date: Fri, 9 May 2014 08:19:24 +0000 (+0200) Subject: editor: fix canvas widgets positioning for inline elements aligned to the left of... X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/869d237d2f1675068423f664f13ce5b0f8707218?hp=d6011e09fc76ad45e40d2930d0af160797fc9daa editor: fix canvas widgets positioning for inline elements aligned to the left of the canvas Putting widgets after content wrapper makes sure the whole node wrapper, when displayed inline, starts on the same line as its first real content. Without this change, the zero length widgets wrapper could land at the end of one line while content wrapper landed on the next one. This caused the whole node wrapper to start above real content making widgets positioning invalid. --- diff --git a/src/editor/modules/documentCanvas/canvas/documentElement.js b/src/editor/modules/documentCanvas/canvas/documentElement.js index 7acf7c8..e374a86 100644 --- a/src/editor/modules/documentCanvas/canvas/documentElement.js +++ b/src/editor/modules/documentCanvas/canvas/documentElement.js @@ -102,7 +102,7 @@ $.extend(DocumentNodeElement.prototype, { contentContainer = $('
') .attr('document-element-content', ''); - wrapper.append(widgetsContainer, contentContainer); + wrapper.append(contentContainer, widgetsContainer); widgetsContainer.find('*').add(widgetsContainer).attr('tabindex', -1); return wrapper; },