Skip to content

Disable blinking cursor on mouseleave #900

Answered by jcubic
tilman-schieber asked this question in Q&A
Discussion options

You must be logged in to vote

--animation: terminal-none disables animation, not the cursor, I'm not sure how the cursor can be invisible. Do you have a reproduction that shows that cursor disappear?

I think that would you need is to disable the terminal on the mouse out and enable it on hover.

Here is the code you can use:

$(document).on('mouseover', '.terminal', (e) => {
    $(e.currentTarget).terminal().enable();
}).on('mouseout', '.terminal', (e) => {
    $(e.currentTarget).terminal().disable();
});

And here is a demo.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@tilman-schieber
Comment options

@jcubic
Comment options

@tilman-schieber
Comment options

Answer selected by tilman-schieber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants