Backspacing at the end of a link in IE no longer ends the link.
Fixed a bug where typing a space within a link in IE caused the space to be added to the end of the link.
This commit is contained in:
parent
7e9a5171f3
commit
94647c4887
3
NEWS
3
NEWS
|
@ -1,5 +1,8 @@
|
|||
1.4.10: June ?, 2008:
|
||||
* New suggest-as-you-type feature for creating links.
|
||||
* Fixed a bug where typing a space within a link in IE caused the space
|
||||
to be added to the end of the link.
|
||||
* Backspacing at the end of a link in IE no longer ends the link.
|
||||
|
||||
1.4.9: June 25, 2008:
|
||||
* When linking to a note by title, the note resolution is now
|
||||
|
|
|
@ -995,10 +995,15 @@ Wiki.prototype.editor_key_pressed = function ( editor, event ) {
|
|||
} else if ( ( code == 32 || code == 9 ) && editor.document.selection && editor.state_enabled( "a" ) ) {
|
||||
if ( code == 32 ) {
|
||||
var range = editor.document.selection.createRange();
|
||||
var text = range.parentElement().firstChild;
|
||||
text.nodeValue += " ";
|
||||
range.text = " ";
|
||||
}
|
||||
event.stop();
|
||||
// IE: hitting backspace while making a link shouldn't end the link
|
||||
} else if ( code == 8 && editor.document.selection && editor.state_enabled( "a" ) ) {
|
||||
var range = editor.document.selection.createRange();
|
||||
range.moveStart( "character", -1 );
|
||||
range.text = "";
|
||||
event.stop();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue