improve focus management by forcing carent in all browsers to be placed at the start of the loaded document

This commit is contained in:
Klaus Leithoff 2013-03-08 13:15:57 +00:00
parent 40c51141d3
commit 8255e95793

View File

@ -543,7 +543,7 @@ class html
function (ev)
{
'.($_focusToBody?'
ev.editor.focus();
ev.editor.focus();':'').'
var d = ev.editor.document;
var r = new CKEDITOR.dom.range(d);
r.collapse(true);
@ -555,9 +555,7 @@ class html
//FF is selecting the span with getNextSourceNode, other browsers need to fetch it with getNext
r.selectNodeContents(((typeof sN.getName==="function") && sN.getName()=="span"?r.startContainer.getNextSourceNode():r.startContainer.getNextSourceNode().getNext()));
r.collapse(true);
r.select();':'').'
':'').
'
r.select();'.'':'').'
ev.editor.resize("100%", '.str_replace('px', '', $pxheight).');
}
);'.