From 0844223492a29ec8ca599e45cb00108517d1aa3e Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 13 Aug 2013 16:54:30 -0700 Subject: [PATCH] Null-check document.activeElement --- js/id/modes/browse.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/id/modes/browse.js b/js/id/modes/browse.js index 6e467f5d6..2b6178cf0 100644 --- a/js/id/modes/browse.js +++ b/js/id/modes/browse.js @@ -20,7 +20,9 @@ iD.modes.Browse = function(context) { }); // Get focus on the body. - document.activeElement.blur(); + if (document.activeElement) { + document.activeElement.blur(); + } if (sidebar) { context.ui().sidebar.show(sidebar);