summaryrefslogtreecommitdiff
path: root/addons/website/static/lib/summernote/src/js/module
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-01-12 10:27:23 +0100
committerChristophe Matthieu <chm@odoo.com>2015-01-16 16:38:08 +0100
commit75341ddcf9544f1e5b7f56951defecd9c278dc18 (patch)
tree9ce4fdeefa28eac9895e9ef6305776f177b3a9ee /addons/website/static/lib/summernote/src/js/module
parenta14c802443e767a5a69d063731991db1a51779a8 (diff)
[FIX] summernote lib: summernote raise when we triple click on a br in air mode. (merge proposal create to summernote)
Diffstat (limited to 'addons/website/static/lib/summernote/src/js/module')
-rw-r--r--addons/website/static/lib/summernote/src/js/module/Popover.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/addons/website/static/lib/summernote/src/js/module/Popover.js b/addons/website/static/lib/summernote/src/js/module/Popover.js
index ec40dc6e7d4..e0531f06c45 100644
--- a/addons/website/static/lib/summernote/src/js/module/Popover.js
+++ b/addons/website/static/lib/summernote/src/js/module/Popover.js
@@ -71,11 +71,14 @@ define([
var $airPopover = $popover.find('.note-air-popover');
if (isAirMode && !styleInfo.range.isCollapsed()) {
- var bnd = func.rect2bnd(list.last(styleInfo.range.getClientRects()));
- showPopover($airPopover, {
- left: Math.max(bnd.left + bnd.width / 2 - PX_POPOVER_ARROW_OFFSET_X, 0),
- top: bnd.top + bnd.height
- });
+ var rect = list.last(styleInfo.range.getClientRects());
+ if (rect) {
+ var bnd = func.rect2bnd(rect);
+ showPopover($airPopover, {
+ left: Math.max(bnd.left + bnd.width / 2 - PX_POPOVER_ARROW_OFFSET_X, 0),
+ top: bnd.top + bnd.height
+ });
+ }
} else {
$airPopover.hide();
}