summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-02-01 12:13:51 +0100
committerChristophe Simonis <chs@odoo.com>2018-02-01 12:13:51 +0100
commit4c9bf7faae4e5e53955fde1e69ef82e72dd51ccb (patch)
tree4392eb38d6f6a83ad21e255fffe650c46ebb17ac /addons/web_editor/static/src
parente15a7b4c6592eaed2d0d127e000ab35422686c8d (diff)
parentcbaecc5cbb82ea847a22cb3efbdbbfe9b18849ed (diff)
[MERGE] forward port branch 9.0 up to cbaecc5cbb8
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/summernote.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js
index a3e3db42a71..8166d77201e 100644
--- a/addons/web_editor/static/src/js/summernote.js
+++ b/addons/web_editor/static/src/js/summernote.js
@@ -2018,6 +2018,14 @@ eventHandler.modules.editor.currentStyle = function (target) {
if(r)
styleInfo.image = r.isOnImg();
}
+ // Fix when the target is a link: the text-align buttons state should
+ // indicate the alignment of the link in the parent, not the text inside
+ // the link (which is not possible to customize with summernote). Summernote fixed
+ // this in their newest version... by just not showing the active button
+ // for alignments.
+ if (styleInfo.anchor) {
+ styleInfo['text-align'] = $(styleInfo.anchor).parent().css('text-align');
+ }
return styleInfo;
}