Fix for iframe cursor positioning not working in certain cases when clicking on a blank area of a static div.
This commit is contained in:
parent
683152fdaf
commit
72b6a0f90c
|
@ -334,6 +334,7 @@ Editor.prototype.add_selection_bookmark = function () {
|
|||
// mark the nodes that are start and end containers for the current range. we have to mark the
|
||||
// parent node instead of the start/end container itself, because text nodes can't have classes
|
||||
var parent_node = range.startContainer.parentNode
|
||||
if ( !hasElementClass( parent_node, "static_note_div" ) ) {
|
||||
addElementClass( parent_node, "range_start_container" );
|
||||
for ( var i in parent_node.childNodes ) {
|
||||
var child_node = parent_node.childNodes[ i ];
|
||||
|
@ -342,8 +343,10 @@ Editor.prototype.add_selection_bookmark = function () {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var parent_node = range.endContainer.parentNode
|
||||
if ( !hasElementClass( parent_node, "static_note_div" ) ) {
|
||||
addElementClass( parent_node, "range_end_container" );
|
||||
for ( var i in parent_node.childNodes ) {
|
||||
var child_node = parent_node.childNodes[ i ];
|
||||
|
@ -352,6 +355,7 @@ Editor.prototype.add_selection_bookmark = function () {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return range;
|
||||
} else if ( document.selection ) { // browsers such as IE
|
||||
|
|
Reference in New Issue