[FIX] web_editor: fix scrolling the page while dragging a snippet
Since the commit [1], it's no longer possible to scroll the page while dragging a snippet thanks to its thumbnail. This is because for mass mailing the scroll element is not the same and to check it we were looking for a class in the DOM. For that we did a jQuery 'find' but without a 'length', the jQuery 'find' is always truthy. [1]: https://github.com/odoo/odoo/commit/29c6c80ac7009aa5068c763778342f7c6b115fad task-2798872 closes odoo/odoo#87021 X-original-commit: d4b231222c5baf726332deddfe6d4c5e3e7865db Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -2403,7 +2403,7 @@ var SnippetsMenu = Widget.extend({
|
||||
|
||||
let dragAndDropResolve;
|
||||
let $scrollingElement = $().getScrollingElement(this.ownerDocument);
|
||||
if (!$scrollingElement[0] || $scrollingElement.find('body.o_in_iframe')) {
|
||||
if (!$scrollingElement[0] || $scrollingElement.find('body.o_in_iframe').length) {
|
||||
$scrollingElement = $(this.ownerDocument).find('.o_editable');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user