do not overlay editor text when ime is active

fixes #1112
This commit is contained in:
nightwing 2013-03-28 21:06:48 +04:00
commit b0a43790b4
4 changed files with 65 additions and 20 deletions

View file

@ -538,13 +538,16 @@ var VirtualRenderer = function(container, theme) {
var posLeft = this.$cursorLayer.$pixelPos.left;
posTop -= config.offset;
if (posTop < 0 || posTop > config.height - this.lineHeight)
var h = this.lineHeight;
if (posTop < 0 || posTop > config.height - h)
return;
var w = this.characterWidth;
if (this.$composition) {
var val = this.textarea.value.replace(/^\x01+/, "");
w *= this.session.$getStringScreenWidth(val)[0];
h += 2;
posTop -= 1;
}
posLeft -= this.scrollLeft;
if (posLeft > this.$size.scrollerWidth - w)
@ -552,10 +555,10 @@ var VirtualRenderer = function(container, theme) {
posLeft -= this.scrollBar.width;
this.textarea.style.height = this.lineHeight + "px";
this.textarea.style.height = h + "px";
this.textarea.style.width = w + "px";
this.textarea.style.right = Math.max(0, this.$size.scrollerWidth - posLeft - w) + "px";
this.textarea.style.bottom = Math.max(0, this.$size.height - posTop - this.lineHeight) + "px";
this.textarea.style.bottom = Math.max(0, this.$size.height - posTop - h) + "px";
};
/**