diff --git a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml index 126d4612d7488..959f3835a7d12 100644 --- a/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml +++ b/app/code/Magento/Search/Test/Mftf/Test/StorefrontVerifySearchSuggestionByProductDescriptionTest.xml @@ -16,6 +16,9 @@ + + + diff --git a/lib/web/requirejs/domReady.js b/lib/web/requirejs/domReady.js index 31bd0d77697ca..d6eaa31187e60 100644 --- a/lib/web/requirejs/domReady.js +++ b/lib/web/requirejs/domReady.js @@ -78,7 +78,7 @@ define(function () { } } - //Check if document already complete, and if so, just trigger page load + //Check if document is no longer loading, and if so, just trigger page load //listeners. Latest webkit browsers also use "interactive", and //will fire the onDOMContentLoaded before "interactive" but not after //entering "interactive" or "complete". More details: @@ -89,7 +89,7 @@ define(function () { //so removing the || document.readyState === "interactive" test. //There is still a window.onload binding that should get fired if //DOMContentLoaded is missed. - if (document.readyState === "complete") { + if (document.readyState !== "loading") { pageLoaded(); } }