From 4a71a413807526ca7d4cc8bf8699d5430694c911 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Fri, 10 Jun 2016 18:01:34 -0700 Subject: [PATCH] Fix cursor blinking when enabled Fixes #119 --- src/xterm.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index 7f01e2a4..3be3244d 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -1283,7 +1283,7 @@ }; Terminal.prototype._cursorBlink = function() { - if (Terminal.focus !== this) return; + if (document.activeElement !== this.element) return; this.cursorState ^= 1; this.refresh(this.y, this.y); }; @@ -1293,8 +1293,7 @@ this.cursorState = 1; this.refresh(this.y, this.y); } else { - // Temporarily disabled: - // this.refreshBlink(); + this.refreshBlink(); } };