diff --git a/src/renderers/dom/client/__tests__/ReactInputSelection-test.js b/src/renderers/dom/client/__tests__/ReactInputSelection-test.js index 5e6e7582731de..02874a3e304de 100644 --- a/src/renderers/dom/client/__tests__/ReactInputSelection-test.js +++ b/src/renderers/dom/client/__tests__/ReactInputSelection-test.js @@ -156,7 +156,7 @@ describe('ReactInputSelection', () => { describe('getSelectionInformation/restoreSelection', () => { it('gets and restores selection for inputs that get remounted', () => { - // Stub out window getSelection + // Mock window getSelection window.getSelection = window.getSelection || makeGetSelection(window); var input = document.createElement('input'); @@ -189,13 +189,12 @@ describe('ReactInputSelection', () => { iframe.setAttribute('tabIndex', 0); document.body.appendChild(iframe); var iframeDoc = iframe.contentDocument; - // Stub out window and iframe getSelection + // Mock window and iframe getSelection window.getSelection = window.getSelection || makeGetSelection(window); iframeDoc.defaultView.getSelection = iframeDoc.defaultView.getSelection || makeGetSelection(iframeDoc.defaultView); - iframe.focus(); var input = document.createElement('input'); input.value = textValue; iframeDoc.body.appendChild(input);