diff --git a/spec/selenium/miscellaneous/jquery_spec.rb b/spec/selenium/miscellaneous/jquery_spec.rb index 11e32198497..5e8710093bd 100644 --- a/spec/selenium/miscellaneous/jquery_spec.rb +++ b/spec/selenium/miscellaneous/jquery_spec.rb @@ -42,9 +42,9 @@ describe "jquery" do expect(driver.execute_script("return $('form input[name=_method]').val()")).to eq "delete" end - it "is able to handle ':hidden' and ':visible' pseudo-selector on window" do + it "is able to handle ':hidden' and ':visible' pseudo-selector on document body" do get("/login") - expect(driver.execute_script("return $(window).is(':visible')")).to be true - expect(driver.execute_script("return $(window).is(':hidden')")).to be false + expect(driver.execute_script("return $(document.body).is(':visible')")).to be true + expect(driver.execute_script("return $(document.body).is(':hidden')")).to be false end end diff --git a/ui/shared/pagination/backbone/views/PaginatedView.js b/ui/shared/pagination/backbone/views/PaginatedView.js index 4aae81dd96b..b60539805d3 100644 --- a/ui/shared/pagination/backbone/views/PaginatedView.js +++ b/ui/shared/pagination/backbone/views/PaginatedView.js @@ -31,7 +31,8 @@ function PaginatedView() { PaginatedView.prototype.paginationLoaderTemplate = template -PaginatedView.prototype.paginationScrollContainer = window +// set default scroll container to window.document.body, because as of jquery 2.0, $(window).is(':visible') is no longer supported, see https://bugs.jquery.com/ticket/14709/ +PaginatedView.prototype.paginationScrollContainer = window.document.body PaginatedView.prototype.distanceTillFetchNextPage = 100