[FIX] summernote lib: summernote raise when we triple click on a br in air mode. (merge proposal create to summernote)

This commit is contained in:
Christophe Matthieu
2015-01-16 16:38:08 +01:00
parent a14c802443
commit 75341ddcf9
@@ -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();
}