Merge pull request #3172 from battleofwizards/fix-doubleclick-on-autocomplete-dropdowns

Fix #3171 doubleclick on autocomplete dropdowns
This commit is contained in:
Christoph Atteneder 2019-09-02 09:21:26 +02:00 committed by GitHub
commit f972984a92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -92,12 +92,15 @@ public class AutocompleteComboBox<T> extends JFXComboBox<T> {
var inputTextItem = getConverter().fromString(inputText);
if (selectedItem != null && selectedItem.equals(inputTextItem)) {
eh.handle(e);
getParent().requestFocus();
return;
}
// Case 2: fire if the text is empty to support special "show all" case
if (inputText.isEmpty())
if (inputText.isEmpty()) {
eh.handle(e);
getParent().requestFocus();
}
});
}