fixing text edition problems

This commit is contained in:
Pablo Luna
2011-03-29 17:06:59 +01:00
parent 9a0de7ed21
commit f8fa8b2b37
3 changed files with 21 additions and 4 deletions

View File

@@ -68,6 +68,7 @@ mindplot.TextEditor = function(screenManager,actionRunner)
};
//Register onLostFocus/onBlur event
$(this.inputText).addEvent('blur', this.lostFocusEvent.bind(this));
$(this.inputText).addEvent('click', this.clickEvent.bindWithEvent(this));
var elem = this;
@@ -98,6 +99,7 @@ mindplot.TextEditor.prototype.lostFocusEvent = function ()
{
this.fx.options.duration = 10;
this.fx.start(1, 0);
designer.getWorkSpace().enableWorkspaceEvents(true);
//myAnim.animate();
};
@@ -386,3 +388,17 @@ mindplot.TextEditor.prototype.lostFocus = function(bothBrowsers)
}
};
mindplot.TextEditor.prototype.clickEvent = function(event){
designer.getWorkSpace().enableWorkspaceEvents(false);
if(this._isVisible()){
if (event.stopPropagation)
{
event.stopPropagation(true);
} else
{
event.cancelBubble = true;
}
}
event.preventDefault();
};