Skip to content
Snippets Groups Projects
Commit 01fb9cab authored by Nshimiyimana Séna's avatar Nshimiyimana Séna
Browse files

[FIX] web_editor: fix codeview toggle


### Steps to reproduce
* Enable Dev mode
* Open an email template
* Open Code View of the template
* Click the green button in the top right corner of the content box

You should be met with a traceback.

opw-3045759

closes odoo/odoo#106063

Signed-off-by: default avatarDavid Monjoie (dmo) <dmo@odoo.com>
parent d5162f81
No related branches found
No related tags found
No related merge requests found
......@@ -307,7 +307,7 @@ export class HtmlField extends Component {
*
* @param {JQuery} $codeview
*/
toggleCodeView (el = this.codeViewRef.el) {
toggleCodeView() {
this.state.showCodeView = !this.state.showCodeView;
this.wysiwyg.odooEditor.observerUnactive('toggleCodeView');
......@@ -317,7 +317,7 @@ export class HtmlField extends Component {
this.props.update(value);
} else {
this.wysiwyg.odooEditor.observerActive('toggleCodeView');
const $codeview = $(el);
const $codeview = $(this.codeViewRef.el);
const value = $codeview.val();
this.props.update(value);
......
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