diff --git a/content/posts/ember-modifiers.md b/content/posts/ember-modifiers.md index a909ac0..416b56f 100644 --- a/content/posts/ember-modifiers.md +++ b/content/posts/ember-modifiers.md @@ -56,7 +56,9 @@ export default class MyComponent extends Component { handleFocus() { this.myButtonHasFocus = true; } @action - handleBlur() { this.myButtonHasFocus = false; } + handleBlur({ target, relatedTarget }) { + if (!target.contains(relatedTarget)) this.myButtonHasFocus = false; + } } ```