summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/rte.summernote.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-08-24 16:33:49 +0200
committerqsm-odoo <qsm@odoo.com>2016-08-25 13:14:42 +0200
commit57246814e924c8bef415a1f29649109ac07dcce8 (patch)
tree59f4e835ee461e8206d252d96d26838bd322965f /addons/web_editor/static/src/js/rte.summernote.js
parente671d055256c614b6166593251ee03f69a844a5f (diff)
[FIX] web_editor: properly bind event to the editor style dropdown
Before this commit, the callback which selects the currently used style in the dropdown menu was binded to the mousedown event on the div which contains the dropdown-toggle and the dropdown-menu. This was wrong as the callback is thus called even when clicking in the dropdown menu.
Diffstat (limited to 'addons/web_editor/static/src/js/rte.summernote.js')
-rw-r--r--addons/web_editor/static/src/js/rte.summernote.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/rte.summernote.js b/addons/web_editor/static/src/js/rte.summernote.js
index cb0e809b439..1c9db256082 100644
--- a/addons/web_editor/static/src/js/rte.summernote.js
+++ b/addons/web_editor/static/src/js/rte.summernote.js
@@ -182,7 +182,7 @@ renderer.tplPopovers = function (lang, options) {
//////////////// text/air popover
//// highlight the text format
- $airPopover.find('.note-style').on('mousedown', function () {
+ $airPopover.find('.note-style .dropdown-toggle').on('mousedown', function () {
var $format = $airPopover.find('[data-event="formatBlock"]');
var node = range.create().sc;
var formats = $format.map(function () { return $(this).data("value"); }).get();