switch (key) {
case 'cursorBlink': this.setCursorBlinking(value); break;
case 'cursorStyle':
- // Style 'block' applies with no class
+ this.element.classList.toggle(`xterm-cursor-style-block`, value === 'block');
this.element.classList.toggle(`xterm-cursor-style-underline`, value === 'underline');
this.element.classList.toggle(`xterm-cursor-style-bar`, value === 'bar');
break;
this.element.classList.add('terminal');
this.element.classList.add('xterm');
this.element.classList.add('xterm-theme-' + this.theme);
+ this.element.classList.add(`xterm-cursor-style-${this.options.cursorStyle}`);
this.setCursorBlinking(this.options.cursorBlink);
this.element.setAttribute('tabindex', 0);
}
on(el, 'mousedown', function(ev) {
+ // prevent the focus on the textarea from getting lost
+ ev.preventDefault();
+
if (!self.mouseEvents) return;
// send the button