From e3538cb0ed957c94783a5937b10bc74be41afe6e Mon Sep 17 00:00:00 2001 From: Ben Gelsey Date: Fri, 21 Apr 2017 16:21:29 +0530 Subject: [PATCH] Fix tests for IE --- packages/react-data-grid/src/__tests__/Focus.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-data-grid/src/__tests__/Focus.spec.js b/packages/react-data-grid/src/__tests__/Focus.spec.js index efa6ded049..0f8e72f150 100644 --- a/packages/react-data-grid/src/__tests__/Focus.spec.js +++ b/packages/react-data-grid/src/__tests__/Focus.spec.js @@ -60,6 +60,7 @@ describe('Focus Tests', () => { describe('with current focus on the body', function() { it('should receive focus when onscreen', function() { + document.body.focus(); // IE requires this explicitly (otherwise activeElement is null) expect(document.activeElement).toBe(document.body); testElement = renderComponent(container); expect(document.activeElement).toBe( @@ -67,6 +68,7 @@ describe('Focus Tests', () => { ); }); it('should not receive focus when offscreen', function() { + document.body.focus(); // IE requires this explicitly (otherwise activeElement is null) expect(document.activeElement).toBe(document.body); window.scrollTo(0, 2000); expect(document.activeElement).toBe(document.body);