Archived
1
0

Apparently 'node.tagName == "FOO"' will throw if tagName is undefined.

This commit is contained in:
Dan Helfman 2009-01-24 23:56:28 -08:00
parent 545e083d59
commit f841c17eeb

View File

@ -450,7 +450,8 @@ Editor.prototype.position_cursor = function ( div_range ) {
else else
var range = this.document.createRange(); var range = this.document.createRange();
while ( ( last_node.nodeValue == "\n" || last_node.tagName == "BR" ) && last_node.previousSibling ) while ( ( last_node.nodeValue == "\n" || ( last_node.tagName && last_node.tagName == "BR" ) ) &&
last_node.previousSibling )
last_node = last_node.previousSibling; last_node = last_node.previousSibling;
range.selectNodeContents( last_node ); range.selectNodeContents( last_node );