PL-8805 Fix incorrect behavior of SearchPickerField and other fields based on SearchAutoCompleteSupport

This commit is contained in:
Stepanov Max 2018-01-26 16:34:09 +04:00
parent 3bee0563e5
commit c2b22a79ec

View File

@ -1942,7 +1942,11 @@ public final class SearchAutoCompleteSupport<E> {
// editor's Document in any way, and also unregister the ActionListeners temporarily.
if (e.getKeyChar() == KeyEvent.VK_ENTER) {
doNotChangeDocument = true;
this.actionListeners = unregisterAllActionListeners(comboBox);
ActionListener[] listeners = unregisterAllActionListeners(comboBox);
if (listeners.length > 0 && this.actionListeners == null) {
this.actionListeners = listeners;
}
}
// make sure this backspace key does not modify our comboBoxEditorComponent's Document