witten
/
luminotes
Archived
1
0
Fork 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
1 changed files with 2 additions and 1 deletions

View File

@ -450,7 +450,8 @@ Editor.prototype.position_cursor = function ( div_range ) {
else
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;
range.selectNodeContents( last_node );