From 12719951c91fcd714abbecd3d5c0136e1019168d Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sat, 11 Jul 2009 22:43:31 -0700 Subject: [PATCH] Fixed a Firefox 3.5 bug in which after ending a link ctrl-L, typed text ended up as part of the link. --- NEWS | 3 +++ static/js/Editor.js | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6c51660..a3862d4 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,8 @@ 1.6.15: ? * No longer charging for Luminotes Desktop or offering subscription signups. + * Fixed a Firefox 3.5 bug in which after ending a link ctrl-L, typed text + ended up as part of the link. Now, ctrl-L properly ends the link and any + typed text after the link does not become linked itself. 1.6.14: June 14, 2009 * Fixed a bug in which some printed or exported notes appeared in diff --git a/static/js/Editor.js b/static/js/Editor.js index 05f3bf3..b0cc8d8 100644 --- a/static/js/Editor.js +++ b/static/js/Editor.js @@ -1314,9 +1314,9 @@ Editor.prototype.end_link = function () { if ( this.iframe.contentWindow && this.iframe.contentWindow.getSelection ) { // browsers such as Firefox this.exec_command( "unlink" ); - // necessary to actually end a link in WebKit. the side-effect is that the cursor jumps to the + // necessary to actually end a link. the side-effect is that the cursor jumps to the // end of the link if it's not already there - if ( link && WEBKIT ) { + if ( link ) { var selection = this.iframe.contentWindow.getSelection(); var sentinel = this.document.createTextNode( Editor.title_placeholder_char ); insertSiblingNodesAfter( link, sentinel );