xtermjs / xterm.js

A terminal for the web
https://xtermjs.org/
MIT License
17.52k stars 1.62k forks source link

Block style cursor not blinking after upgrade 5.3.0 -> 5.4.0 #4987

Closed RahjIII closed 6 months ago

RahjIII commented 7 months ago

I've updated from xterm.js 5.3.0 to 5.4.0 and noticed that the cursor is no longer blinking when it is focused and in block mode.

With these options set: "cursorBlink": true, "cursorStyle": "block", "cursorInactiveStyle": "outline"

The cursor goes from outline to block style when the terminal is focused, but the block cursor does not blink as expected. It is supposed to blink, and does blink under xterm.js 5.3.0.

With cursorStyle set to "underline" and cursorBlink to true, the cursor does blink as expected. If I change cursorBlink to false, then the underline cursor does not blink as expected. (showing that the cursorBlink attribute is being honored for the underline cursor)

It only appears that the cursor is fails to blink when cursorBlink is true and cursorStyle is block.

Details

Steps to reproduce

  1. Set cursorStyle to block
  2. Set cursorBlink to true
  3. set cursorInactiveStyle to outline
  4. focus the terminal to activate the cursor
  5. If cursor goes active and turns into a block, but does not blink, problem is reproduced.
tisilent commented 7 months ago

DomRenderer

tisilent commented 7 months ago

bar style cursor not blinking 👻 ...

RahjIII commented 7 months ago

bar style cursor not blinking 👻 ...

Confirmed, bar style | also not blinking in 5.4.0. (Sorry 'bout that, I should have tried it too for completeness.)

tisilent commented 7 months ago

@RahjIII If possible, using webgl addon is a good option

RahjIII commented 7 months ago

Enabled webgl addon, cursors work fine.

devjiwonchoi commented 6 months ago

Hi, I'm facing the same issue and can confirm that webgl addon does fix this, but if enabled, how can we test the inner contents?

Tyriar commented 6 months ago

@devjiwonchoi you can't really if you want to query the actual dom. You could try enabling screenReaderMode which adds info for screen readers (though maybe not in the exact format you expect) or using the buffer API. I'm guessing you want the DOM renderer though

devjiwonchoi commented 6 months ago

Sounds great. Thank you for replying!

Tyriar commented 6 months ago

Probably caused by https://github.com/xtermjs/xterm.js/issues/4773