Skip to content
Snippets Groups Projects
Commit fc6f66f1 authored by Rodolpho Lima's avatar Rodolpho Lima
Browse files

[FIX] web_editor: toolbar in website forum


Steps:

In a website forum post without any previous scrolling, select some
text. A traceback appears due the fact that there's no .o_action_manager
element in website forum.

This commit uses the document body as a fallback for the scroll
container when the .o_action_manager element is not present.

task-3506312

closes odoo/odoo#135785

Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
parent 7dc306d6
No related branches found
No related tags found
No related merge requests found
......@@ -209,7 +209,7 @@ const Wysiwyg = Widget.extend({
getContextFromParentRect: options.getContextFromParentRect,
getScrollContainerRect: () => {
if (!this.scrollContainer || !this.scrollContainer.getBoundingClientRect) {
this.scrollContainer = document.querySelector('.o_action_manager');
this.scrollContainer = document.querySelector('.o_action_manager') || document.body;
}
return this.scrollContainer.getBoundingClientRect();
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment