Skip to content

Commit

Permalink
[FIX] web_editor: stop crashing on applying fonts with standalone sum…
Browse files Browse the repository at this point in the history
…mernote

Commit odoo@137c4f5?w=1#diff-6a334b274d95fb88a4fbc29b910fbb59R2120
introduced a bug as it is using a function which is defined in another
asset. This is fine for connected users but not for summernote-only
users like public users on the forum.

The reason the line was introduced is unsure so it is simply removed for
now. The bug it was supposed to fix will be fixed later if it ever needs
to be.
  • Loading branch information
qsm-odoo committed Feb 26, 2018
1 parent 034c075 commit c254c4c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions addons/web_editor/static/src/js/editor/summernote.js
Original file line number Diff line number Diff line change
Expand Up @@ -2176,7 +2176,6 @@ $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color
}

// remove node without attributes (move content), and merge the same nodes
if (!dom.isImgFont(node)) {
var className2, style, style2;
for (i=0; i<nodes.length; i++) {
node = nodes[i];
Expand Down Expand Up @@ -2217,7 +2216,6 @@ $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color
}
}
}
}

range.create(startPoint.node, startPoint.offset, endPoint.node, endPoint.offset).select();
};
Expand Down

0 comments on commit c254c4c

Please sign in to comment.