0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 07:13:08 -05:00

Log errors from fixCursor to track down bug

This commit is contained in:
Neil Jenkins 2016-03-24 22:04:42 +11:00
parent 4ca3b20b8a
commit 3dca852630
3 changed files with 20 additions and 4 deletions

View file

@ -406,7 +406,15 @@ function fixCursor ( node, root ) {
}
}
if ( fixer ) {
node.appendChild( fixer );
try {
node.appendChild( fixer );
} catch ( error ) {
getSquireInstance( doc ).didError({
name: 'Squire: fixCursor  ' + error,
message: 'Parent: ' + node.nodeName + '/' + node.innerHTML +
' appendChild: ' + fixer.nodeName
});
}
}
return originalNode;

File diff suppressed because one or more lines are too long

View file

@ -235,7 +235,15 @@ function fixCursor ( node, root ) {
}
}
if ( fixer ) {
node.appendChild( fixer );
try {
node.appendChild( fixer );
} catch ( error ) {
getSquireInstance( doc ).didError({
name: 'Squire: fixCursor  ' + error,
message: 'Parent: ' + node.nodeName + '/' + node.innerHTML +
' appendChild: ' + fixer.nodeName
});
}
}
return originalNode;