Fix #3171 doubleclick on autocomplete dropdowns

This commit is contained in:
battleofwizards 2019-08-31 22:48:25 +02:00
parent 0a12676946
commit 73c8832603
No known key found for this signature in database
GPG Key ID: 58B1485148D203E1

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();
}
});
}