Some typos and a range fix for IE.
This commit is contained in:
parent
3944ebc9d9
commit
42d4d514d2
|
@ -250,6 +250,8 @@ Editor.prototype.claim_iframe = function ( position_after, click_position ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// this small delay gives the browser enough lag time after set_iframe_contents() to process the HTML
|
// this small delay gives the browser enough lag time after set_iframe_contents() to process the HTML
|
||||||
|
// FIXME: with this lag time, any selected text briefly flashes. without this lag, selection text doesn't
|
||||||
|
// flash, but if there is no selected text, then the text cursor doesn't show up
|
||||||
setTimeout( finish_init, 1 );
|
setTimeout( finish_init, 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,6 +293,9 @@ Editor.prototype.focus_default_text_field = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
Editor.prototype.add_selection_bookmark = function () {
|
Editor.prototype.add_selection_bookmark = function () {
|
||||||
|
if ( !window.getSelection ) // IE
|
||||||
|
return null;
|
||||||
|
|
||||||
// grab the current range for this editor's div so that it can be duplicated within the iframe
|
// grab the current range for this editor's div so that it can be duplicated within the iframe
|
||||||
var selection = window.getSelection();
|
var selection = window.getSelection();
|
||||||
if ( selection.rangeCount > 0 )
|
if ( selection.rangeCount > 0 )
|
||||||
|
|
|
@ -490,7 +490,7 @@ Wiki.prototype.create_blank_editor = function ( event ) {
|
||||||
|
|
||||||
// if there is already a blank editor, then highlight it and bail
|
// if there is already a blank editor, then highlight it and bail
|
||||||
if ( Editor.shared_iframe && Editor.shared_iframe.editor && Editor.shared_iframe.editor.empty() ) {
|
if ( Editor.shared_iframe && Editor.shared_iframe.editor && Editor.shared_iframe.editor.empty() ) {
|
||||||
Editor.shared_iframe..editor.highlight();
|
Editor.shared_iframe.editor.highlight();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user