Archived
1
0

Hack to prevent Firefox from erasing spaces before links that happen to be at the end of list items.

I hate the web.
This commit is contained in:
Dan Helfman 2007-08-22 21:09:15 +00:00
parent f9b355277c
commit d1b8a2201b

View File

@ -339,6 +339,10 @@ Editor.prototype.start_link = function () {
this.exec_command( "createLink", "/notebooks/" + this.notebook_id + "?note_id=new" );
// hack to prevent Firefox from erasing spaces before links that happen to be at the end of list items
var sentinel = createDOM( "span" );
insertSiblingNodesBefore( placeholder.parentNode, sentinel );
// nuke the link title and collapse the selection, yielding a tasty new link that's completely
// titleless and unselected
removeElement( placeholder );