this.focus();
//In mozilla, if last child is not a text node, we have to use selectElementChildren on this.editNode.lastChild//otherwise the cursor would be placed at the end of the closing tag of this.editNode.lastChildvar isvalid=false;
if(dojo.isMoz){var last=this.editNode.lastChild;
while(last){if(last.nodeType == 3){if(last.nodeValue.replace(/^\s+|\s+$/g, "").length>0){
isvalid=true;
dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last]);
break;
}}elseif(last.nodeType == 1){
isvalid=true;
if(last.lastChild){
dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last.lastChild]);
}else{
dojo.withGlobal(this.window, "selectElement",dijit._editor.selection, [last]);
}break;
}
last = last.previousSibling;
}}else{
isvalid=true;
dojo.withGlobal(this.window, "selectElementChildren",dijit._editor.selection, [this.editNode]);
}if(isvalid){
dojo.withGlobal(this.window, "collapse", dijit._editor.selection, [false]);
}