1. Create or open an editor of an arbitrary mime-type let's call it fileA.
2. Select some text e.g. 'package'.
3. Create or open a second file.
4. Press Ctrl+F (on Linux or Windows) to search for a text - enter e.g. 'ab' into find text field.
5. Press Ctrl+PgUp to focus fileA (while focus still remains in the find text field of the search bar).
6. Find field's text changes to 'package' (the text selected in fileA). IMHO this is confusing behavior in this particular scenario and the text of the search field should remain unchanged.
Thank you, I disallow setting selected text to findbar if findbar was trigger by persistencelistener.
Fixed in http://hg.netbeans.org/jet-main/rev/3ee0f5a876f1
Integrated into 'main-silver', will be available in build *201704050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Milutin Kristofic <firstname.lastname@example.org>
Log: #270242 - Find text changed when search bar gets attached to a component with selected text