witten
/
luminotes
Archived
1
0
Fork 0

Fixed a Chrome/Safari bug in which ending a link didn't always work.

Specifically, in a list of two elements in which each element was a link,
clicking right after the first element and then pressing ctrl-L to end the
link didn't work as expected. Now it does.
This commit is contained in:
Dan Helfman 2008-12-03 13:10:18 -08:00
parent bf4bf4026e
commit cfdd666c5f
2 changed files with 4 additions and 2 deletions

2
NEWS
View File

@ -1,5 +1,5 @@
1.5.9:
*
* Fixed a Chrome/Safari bug in which ending a link didn't always work.
1.5.8: November 24, 2008
* Fixed a bug that prevented notes from being automatically saved in certain

View File

@ -602,7 +602,9 @@ Editor.prototype.end_link = function () {
// end of the link if it's not already there
if ( link && WEBKIT ) {
var selection = this.iframe.contentWindow.getSelection();
selection.collapse( link, 1 );
var sentinel = this.document.createTextNode( Editor.title_placeholder_char );
insertSiblingNodesAfter( link, sentinel );
selection.collapse( sentinel, 1 );
}
} else if ( this.document.selection ) { // browsers such as IE
// if some text is already selected, unlink it and bail