Minor fix to position cursor.

This commit is contained in:
Paulo Veiga
2011-09-05 09:25:38 -03:00
parent 0e21aad802
commit 12221ab0af
2 changed files with 25 additions and 21 deletions

View File

@@ -161,9 +161,9 @@ mindplot.TextEditor = new Class({
var elemSize = topic.getSize();
this._setEditorSize(elemSize.width, elemSize.height);
var inputElem = this._getTextareaElem();
inputElem.focus();
this._changeCursor(inputElem, $defined(defaultText));
var textareaElem = this._getTextareaElem();
textareaElem.focus();
this._positionCursor(textareaElem, !$defined(defaultText));
}.bind(this);
@@ -225,7 +225,7 @@ mindplot.TextEditor = new Class({
this._containerElem.style.height = this._size.height + "px";
},
_changeCursor : function(inputElem, selectText) {
_positionCursor : function(inputElem, selectText) {
// Select text if it's required ...
if (inputElem.createTextRange) //ie
{