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

focus-traversable broken #234

Closed
TomasMikula opened this issue Dec 28, 2015 · 4 comments
Closed

focus-traversable broken #234

TomasMikula opened this issue Dec 28, 2015 · 4 comments

Comments

@TomasMikula
Copy link
Member

By removing inheritance from Control, StyledTextArea lost the ability to be focused by Tab-traversal.

@JordanMartinez
Copy link
Contributor

I'm not sure how the code originally distinguished between a Tab-traversal and a Tab-insertion/deletion event as they both use the same input combinations (Tab and Shift+Tab). So, that's why I might be finding it difficult to understand this issue and how to re-support the feature.

One way to re-support this again is by using the internal API. However, access to that API will be removed in Java 9, so I'm guessing that's the wrong long-term approach.

The only other way is to override the STA's Tab handlers. However, since they use the same input combinations, overriding the defaults would also remove the user's ability to insert/delete tab characters. So, either this trade-off is left up to each developer to decide or some other input combination is used to signal a Tab-traversal event.

And because its always important to ask, why should this still be supported? Is it to keep consistency with JavaFX's TextField and TextArea classes which also allow Tab-Traversal?

(And how did you use an icon for the Tab key rather than typing "Tab" itself?)

@TomasMikula
Copy link
Member Author

Originally, you could only enter the StyledTextArea by Tab, not leave it, because, as you notice, the Tab key handler is overridden. So entering by Tab is all that needs to be done in this issue. Maybe all that needs to be done is set focusTraversableProperty to true?

You can type Tab by <kbd>Tab</kbd>.

@JordanMartinez
Copy link
Contributor

Ah... that makes more sense! You are right again about the focusTraversableProperty. Once set to true, I can set the focus to one of the buttons and then Tab into the area. Without that, it doesn't work.

Thanks! I don't think I saw that on the markdown cheat sheet.

@TomasMikula
Copy link
Member Author

Not really markdown, just inline HTML inside markdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants