Null-check document.activeElement

This commit is contained in:
John Firebaugh
2013-08-13 16:54:30 -07:00
parent bfd89e2d14
commit 0844223492

View File

@@ -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);