]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Keep composition textarea within viewport
authorDaniel Imms <daimms@microsoft.com>
Sat, 22 Oct 2016 22:41:55 +0000 (15:41 -0700)
committerDaniel Imms <daimms@microsoft.com>
Sat, 22 Oct 2016 22:41:55 +0000 (15:41 -0700)
Part of #299

src/CompositionHelper.js

index 763994949d1edd18e530d6a4880bd77ff0045799..9d24dbc3106765e574a75cec72de1df8204b811d 100644 (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);