Skip to content

Commit

Permalink
Update hippo-gallery.js
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb committed Nov 1, 2017
1 parent 01a16a8 commit a578fe0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hippo-gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,13 @@ window.addEventListener("load", function(e) {
})


// scrolling on fixed divs on mobile is a pain. Using the following code it get's a little bit more bearable
// scrolling on fixed divs on mobile is a pain. The following code is an attempt to make it more bearable
window.addEventListener("scroll", function(e) {
if(hasClass(getElemById("hippo-lightbox-bg"),"loaded"))
{
e.preventDefault() // some people say this works to disable scrolling. Maybe it works in some rare browsers
if(currentScrollY) // undefined on IE
window.scrollTo(currentScrollX, currentScrollY)
console.log(currentScrollX,currentScrollY)
}
})

Expand Down

0 comments on commit a578fe0

Please sign in to comment.