IAmJordanX / seaglass

Automatically exported from code.google.com/p/seaglass
0 stars 0 forks source link

Search field loses caret position/selection when find button is clicked #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a JTextField with search in JTextField.variant client property.
2. Set JTextField.Search.FindPopup client property to a JPopupMenu.
3. Enter some text in the field and click the find button.

What is the expected output? What do you see instead?

I expect the popup to appear and the caret position in the search field to 
remain as it was. 
Instead, the caret moves to the beginning of the search field and any selection 
is removed.

This is because as far as JTextField is concerned, I clicked at the beginning 
of the field rather 
than on a button.

Original issue reported on code.google.com by kahuxtable on 19 Jan 2010 at 1:18