paulrouget / dzslides

DZSlides is a one-file HTML template to build slides in HTML5 and CSS3.
http://paulrouget.com/dzslides
938 stars 255 forks source link

safari bind event problem #53

Closed revolunet closed 12 years ago

revolunet commented 12 years ago

Hi !

I had some problems using dzslides with Safari (and thus phantomjs). The problem is with the bindevent call.

I fixed it with this :

function init() {
    Dz.init();
    window.onkeydown = Dz.onkeydown.bind(Dz);
    window.onresize = Dz.onresize.bind(Dz);
    window.onhashchange = Dz.onhashchange.bind(Dz);
    window.onmessage = Dz.onmessage.bind(Dz);
}

window.onload = init;

Hope this helps. (Tell me if you want a pull request)

dcanetma commented 12 years ago

+1 Thanks @revolunet

codeincontext commented 12 years ago

Thanks for this! I put this into a pull request, to save you the effort.

https://github.com/paulrouget/dzslides/pull/54

hsablonniere commented 12 years ago

Pull request #54 is about to be merged.