Keep composition textarea within viewport

Part of #299
This commit is contained in:
Daniel Imms
2016-10-22 15:41:55 -07:00
parent b1c6ae8a06
commit 1ec0bac9c6
+2 -1
View File
@@ -182,7 +182,8 @@ CompositionHelper.prototype.updateCompositionElements = function(dontRecurse) {
this.compositionView.style.top = cursor.offsetTop + 'px';
var compositionViewBounds = this.compositionView.getBoundingClientRect();
this.textarea.style.left = cursor.offsetLeft + compositionViewBounds.width + 'px';
this.textarea.style.top = (cursor.offsetTop + cursor.offsetHeight) + 'px';
this.textarea.style.top = cursor.offsetTop + 'px';
this.textarea.style.bottom = (cursor.offsetTop + cursor.offsetHeight) + 'px';
}
if (!dontRecurse) {
setTimeout(this.updateCompositionElements.bind(this, true), 0);