From 9785d0706add0e2cfad7327c2629409c18ada49e Mon Sep 17 00:00:00 2001 From: Will Ernest Date: Mon, 4 Jun 2018 14:46:57 -0700 Subject: [PATCH] feat(list): Update menu test to check for focus --- packages/mdc-menu/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mdc-menu/index.js b/packages/mdc-menu/index.js index f250e646ff8..03a7f89bca5 100644 --- a/packages/mdc-menu/index.js +++ b/packages/mdc-menu/index.js @@ -163,7 +163,7 @@ class MDCMenu extends MDCComponent { this.previousFocus_ = document.activeElement; }, restoreFocus: () => { - if (this.previousFocus_) { + if (this.previousFocus_ && this.previousFocus_.focus) { this.previousFocus_.focus(); } },