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

Ensure JSpinner text is selected on focus #12

Open
1 of 3 tasks
hinerm opened this issue Apr 30, 2015 · 0 comments
Open
1 of 3 tasks

Ensure JSpinner text is selected on focus #12

hinerm opened this issue Apr 30, 2015 · 0 comments

Comments

@hinerm
Copy link
Member

hinerm commented Apr 30, 2015

3d3b555 partially implements a solution for text boxes in a JSpinner to be selected on focus. It works nicely for tabbing, but sometimes on click selection happens but is then lost.

Presumably this is a race condition with queuing the text box selection and some sort of validation of the JSpinner. But it's not clear what.

There are many SO posts discussing this but none seemed perfect resolutions.

Secondary goals:

  • Understand why we would want to select text on focus lost
  • Test on OS's besides mac
  • Do NOT rely on sleep statements to queue selection after any JSpinner validation has passed
@hinerm hinerm added the bug label Apr 30, 2015
hinerm added a commit that referenced this issue Apr 30, 2015
This (mostly) ensures the text of a JSpinner is selected on focus. On OSX it
seems to always work with tabs, and mostly work with mouse clicking. However
there does seem to be a race condition where the text selection can be lost,
presumably from the JSPinner firing a validation event after the text field's
selection has been processed.

See #12 for future work.
hinerm added a commit that referenced this issue Apr 30, 2015
This (mostly) ensures the text of a JSpinner is selected on focus. On OSX it
seems to always work with tabs, and mostly work with mouse clicking. However
there does seem to be a race condition where the text selection can be lost,
presumably from the JSPinner firing a validation event after the text field's
selection has been processed.

See #12 for future work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants