Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show hollow cursor when not focused #79

Closed
Tyriar opened this issue Jun 4, 2016 · 6 comments
Closed

Show hollow cursor when not focused #79

Tyriar opened this issue Jun 4, 2016 · 6 comments
Labels
type/enhancement Features or improvements to existing features

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 4, 2016

Right now the solid cursor is shown even when the terminal is not focused, making it more difficult to tell where the application's focus is. Ideally this should be represented by a character something like this:

image

@Tyriar
Copy link
Member Author

Tyriar commented Jun 4, 2016

Due to the textarea typically having focus over .terminal, I don't think this can't be implemented by consumers of xterm.js currently. It needs something like a focus class being added to .terminal so it can be styled accordingly.

@parisk parisk added the type/enhancement Features or improvements to existing features label Jun 6, 2016
@parisk
Copy link
Contributor

parisk commented Jun 6, 2016

Sounds like a great enhancement. I think that after merging #78 (dropping of hidden textarea), this will be a piece of cake to implement with plain CSS.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 6, 2016

Awesome 👍

parisk added a commit that referenced this issue Jun 7, 2016
@parisk
Copy link
Contributor

parisk commented Jun 7, 2016

Hi @Tyriar could please take a look at the fix in #82. Nothing special though. Should work out of the box.

@jdmayfield
Copy link

Hi guys. Is there a way to detect whether the terminal already has focus? Like term.isFocused or something like that?

@parisk
Copy link
Contributor

parisk commented Oct 23, 2017

Yes @jdmayfield. The terminal object gets the focus class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Features or improvements to existing features
Projects
None yet
Development

No branches or pull requests

3 participants