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

Patch opera events #36

Closed mstalfoort closed 12 years ago

mstalfoort commented 13 years ago

Patch for event triggers not working in Opera

paulrouget commented 13 years ago

Can you explain why you are moving this code?

mstalfoort commented 13 years ago

Sure I can.

In the initial setup as you have in your master branch, the Dz.init.bind e.g. doesn't get triggered in Opera onload. Not sure if this is a bug in Opera, but moving these events after the "bind" Function prototype solves this.

paulrouget commented 13 years ago

Well, you can't move the init functions in the Helper section. Move the listeners to the init(), and attach init() like that: window.onload = function() {Dz.init()} And then, we won't need bind anymore.

hsablonniere commented 13 years ago

Just looked at firefly and I'm a bit confused. Opera shouldn't need the bind polyfill but it complains that Dz.init.bind(Dz) is not a function. If we execute the verification in the console it actually is a function.

@paulrouget I tried your solution, it works but the same problem appears on each event listener.

@mstalfoort Changing every listener declaration would work, but it would be better to understand why this behaviour happens and find out why we need to do that.

mstalfoort commented 13 years ago

The same thing happens regarding the foreach nodelist prototype, whereas opera throws errors in the console. We could fallback to the array foreach version, what do you think?

hsablonniere commented 13 years ago

Hey Mark, what is your status on that issue, any progress ?

mstalfoort commented 13 years ago

Hey Hubert.

To be honest, no progress up till now. It has been crazy times at work and about to leave for holiday in a couple of days. I'm still willing to fix this issue so if you could leave it open I will get back on this when I come home again.

hsablonniere commented 13 years ago

No problem Man, we all have other stuffs to do. Just wanted to know your status. See ya.

hsablonniere commented 12 years ago

@mstalfoort I corrected a bug with forEach on Opera 11.60 (see #56), everything else works fine. If you're still having troubles don't hesitate to comment on this bug, we'll discuss it.