diff --git a/addon/components/select-box/index.gjs b/addon/components/select-box/index.gjs index dea37a87..7f31ff20 100644 --- a/addon/components/select-box/index.gjs +++ b/addon/components/select-box/index.gjs @@ -274,15 +274,6 @@ export default class SelectBox extends Component { this._ensureFocus(); } - @action - handleFocusOut() { - if (this.dropdown) { - return; - } - - this._forgetActiveOption(); - } - @action handleKeyDownTrigger(event) { this._handleKeyDown(event); @@ -671,7 +662,6 @@ export default class SelectBox extends Component { data-disabled="{{this.isDisabled}}" {{on "mouseleave" this.handleMouseLeave}} {{on "mousedown" this.handleMouseDown}} - {{on "focusout" this.handleFocusOut}} {{lifecycle onInsert=this.handleInsertElement onDestroy=this.handleDestroyElement diff --git a/tests/integration/components/select-box/index/focus-test.gjs b/tests/integration/components/select-box/index/focus-test.gjs index 0db8a8e6..161ebd23 100644 --- a/tests/integration/components/select-box/index/focus-test.gjs +++ b/tests/integration/components/select-box/index/focus-test.gjs @@ -591,15 +591,9 @@ module('select-box (focus)', function (hooks) { ); }); - test('focus out listbox forgets active option', async function (assert) { + test('focus out does not forget active option', async function (assert) { assert.expect(2); - // We only show the active option when the select box has focus, - // because it is receptive to user input and therefore can - // be selected. When not focused, there is no need for it. - // This is the equivalent of when a select box with a dropdown - // (a combobox) is closed. - await render(