diff --git a/app/javascript/controllers/select_controller.js b/app/javascript/controllers/select_controller.js index 00d6083a..ae510ff2 100644 --- a/app/javascript/controllers/select_controller.js +++ b/app/javascript/controllers/select_controller.js @@ -28,6 +28,9 @@ export default class extends Controller { onDelete: function (values, event) { return ismultiple || !(values.length == 1 && !hasEmptyOption); }, + onChange: function () { + document.activeElement.blur() + }.bind(this) }; } this.instance = new TomSelect(this.element, options);