0
Fork 0
mirror of https://github.com/fastmail/Squire.git synced 2024-12-22 15:23:29 -05:00

Always call setSelection after bookmarking.

IE and Safari 5 loses the selection during the bookmarking process, so we must
always explicitly reset the selection after recording an undo state (which adds
a bookmark).
This commit is contained in:
Neil Jenkins 2013-03-08 13:25:56 +11:00
parent 6927928a79
commit a12f6905a5

View file

@ -1689,6 +1689,7 @@
if ( !notWS.test( text.charAt( range.startOffset - 1 ) ) ) {
recordUndoState( range );
getRangeAndRemoveBookmark( range );
setSelection( range );
}
setTimeout( afterDelete, 0 );
}
@ -1741,6 +1742,7 @@
if ( !notWS.test( text.charAt( range.startOffset ) ) ) {
recordUndoState( range );
getRangeAndRemoveBookmark( range );
setSelection( range );
}
setTimeout( afterDelete, 0 );
}