Only position composition view if a cursor is visible

This commit is contained in:
Daniel Imms 2016-07-13 20:12:49 -07:00
parent e1c1b07a0b
commit 8074d754d3

View File

@ -259,8 +259,10 @@
*/
CompositionHelper.prototype.updateCompositionViewPosition = function() {
var cursor = this.terminal.element.querySelector('.terminal-cursor');
this.compositionView.style.left = cursor.offsetLeft + 'px';
this.compositionView.style.top = cursor.offsetTop + 'px';
if (cursor) {
this.compositionView.style.left = cursor.offsetLeft + 'px';
this.compositionView.style.top = cursor.offsetTop + 'px';
}
};