[FIX] web_{editor}: add missing args in position callback
Before this commit: When attempting to open a dynamic placeholder in email marketing, a traceback occurs. After this commit: Now the dynamic placeholder works properly. Task-3373356 closes odoo/odoo#129415 X-original-commit: bb9fb402a135baf7e7b9da9bbb40888f5323ded9 Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -13,7 +13,7 @@ export function useDynamicPlaceholder(elementRef) {
|
||||
let positionCallback;
|
||||
const popover = usePopover(DynamicPlaceholderPopover, {
|
||||
onclose: () => closeCallback?.(),
|
||||
onPositioned: () => positionCallback?.(),
|
||||
onPositioned: (popper, position) => positionCallback?.(popper, position),
|
||||
});
|
||||
const notification = useService("notification");
|
||||
|
||||
|
||||
@@ -343,7 +343,7 @@ export class HtmlField extends Component {
|
||||
// Ensure the focus is in the editable document
|
||||
// before inserting the <t> element.
|
||||
this.wysiwyg.focus();
|
||||
let dynamicPlaceholder = "object." + chain.join('.');
|
||||
let dynamicPlaceholder = "object." + chain;
|
||||
dynamicPlaceholder += defaultValue && defaultValue !== '' ? ` or '''${defaultValue}'''` : '';
|
||||
const t = document.createElement('T');
|
||||
t.setAttribute('t-out', dynamicPlaceholder);
|
||||
|
||||
Reference in New Issue
Block a user