[MERGE] forward port branch 9.0 up to c9e7433c23
This commit is contained in:
@@ -666,7 +666,15 @@ function summernote_mousedown (event) {
|
||||
}
|
||||
|
||||
// restore range if range lost after clicking on non-editable area
|
||||
r = range.create();
|
||||
try {
|
||||
r = range.create();
|
||||
} catch (e) {
|
||||
// If this code is running inside an iframe-editor and that the range
|
||||
// is outside of this iframe, this will fail as the iframe does not have
|
||||
// the permission to check the outside content this way. In that case,
|
||||
// we simply ignore the exception as it is as if there was no range.
|
||||
return;
|
||||
}
|
||||
var editables = $(".o_editable[contenteditable], .note-editable[contenteditable]");
|
||||
var r_editable = editables.has((r||{}).sc);
|
||||
if (!r_editable.closest('.note-editor').is($editable) && !r_editable.filter('.o_editable').is(editables)) {
|
||||
|
||||
Reference in New Issue
Block a user