Detecting Opera 12.5 transition end possible w/ the prefixed method? [Docs question] #24

Closed
alexisgo opened this Issue Sep 30, 2012 · 1 comment

Comments

Projects
None yet
2 participants

Hi ya'll,

This is likely a question for Opera, and I will ask them as well, but wanted to get your take.

I've been using your incredibly helpful code snippet from the docs section on the prefixed method (http://modernizr.com/docs/#prefixed) that details how to use it to ascertain which transition end event to bind to.

The site provides this code:

var transEndEventNames = {
    'WebkitTransition' : 'webkitTransitionEnd',
    'MozTransition'    : 'transitionend',
    'OTransition'      : 'oTransitionEnd',
    'msTransition'     : 'MSTransitionEnd',
    'transition'       : 'transitionend'
},
transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];

Per Ian Lunn at http://www.ianlunn.co.uk/blog/articles/opera-12-otransitionend-bugs-and-workarounds/ in Opera 12 they changed the case of oTransitionEnd to be otransitionend instead. So I modified the Opera line to:
'OTransition' : 'oTransitionEnd otransitionend',

This works in Opera 12 just fine, but in Opera 12.5, I noticed that Modernizr.prefixed('transition') actually returns... WebkitTransition. I'm assuming that's due to their choice to support the -webkit- prefixes, but I don't understand why WebkitTransition is returned prior to the Opera version.

Now, I realize this isn't a Modernizr problem, but an Opera one, but I was hoping you might update the docs and the code snippet to give me a hint as to how to best accomodate Opera 11, 12, and well, 12.5.

Owner

paulirish commented Oct 1, 2012

Opera supports webkit prefixes as of 12.5 yes.

that's their choice but this behavior is up to them. it reports webkit first because our for loop to check all prefixes checks webkit first.

soo... this shouldn't be a problem for you.. it's just the way it is. :)

@paulirish paulirish closed this Mar 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment