Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for synthetic animation/transition events. #6005

Merged
merged 1 commit into from Feb 28, 2016

Conversation

Projects
None yet
4 participants
@milesj
Copy link
Contributor

commented Feb 9, 2016

As the title states.

This is a recreation of #5835 as my branch got foobar'd.

I tested this using a real code base here: https://github.com/titon/toolkit/blob/3.0/src/components/carousel/ItemList.js#L210

/**
* Element to check for prefixes on.
*/
var style = document.createElement('div').style;

This comment has been minimized.

Copy link
@zpao

zpao Feb 18, 2016

Member

This needs to be guarded in a canUseDOM check.

topTransitionEnd: eventTypes.transitionEnd,
topVolumeChange: eventTypes.volumeChange,
topWaiting: eventTypes.waiting,
topWheel: eventTypes.wheel,

This comment has been minimized.

Copy link
@zpao

zpao Feb 18, 2016

Member

Can you actually just add your items and not re-format the whole block. We should fix the formatting separately (and get rid of the whitespace)

@facebook-github-bot

This comment has been minimized.

Copy link

commented Feb 19, 2016

@milesj updated the pull request.

@milesj

This comment has been minimized.

Copy link
Contributor Author

commented Feb 19, 2016

@zpao Updated based on comments.

@milesj milesj force-pushed the milesj:synthetic-transition branch from 8f5742b to 1a041cc Feb 20, 2016

@milesj

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2016

Would be cool if this made it into v15 👍

nativeEvent,
nativeEventTarget
) {
SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent, nativeEventTarget);

This comment has been minimized.

Copy link
@koba04

koba04 Feb 25, 2016

Contributor

SyntheticEvent constructor has to return this explicitly now.
#5947

This comment has been minimized.

Copy link
@milesj

milesj Feb 25, 2016

Author Contributor

Thanks for the heads up.

@facebook-github-bot

This comment has been minimized.

Copy link

commented Feb 25, 2016

@milesj updated the pull request.

@zpao zpao added this to the 15.0 milestone Feb 26, 2016

prefixes['Webkit' + styleProp] = 'webkit' + eventName;
prefixes['Moz' + styleProp] = 'moz' + eventName;
prefixes['ms' + styleProp] = 'MS' + eventName;
prefixes['O' + styleProp] = 'o' + eventName + ' o' + eventName.toLowerCase();

This comment has been minimized.

Copy link
@zpao

zpao Feb 26, 2016

Member

This doesn't look right. Why do we have a space separated value?

This comment has been minimized.

Copy link
@milesj

milesj Feb 26, 2016

Author Contributor

Oops, nice catch, that's left over from old jQuery code I copied. It was there because different versions of Opera supported either otransitionend or oTransitionEnd and jQuery allowed binding multiple events via spaces. The lowercase one is the latest, so I will update to use that.

@milesj milesj force-pushed the milesj:synthetic-transition branch from 37f8a44 to 260353e Feb 26, 2016

@facebook-github-bot

This comment has been minimized.

Copy link

commented Feb 26, 2016

@milesj updated the pull request.

prefixes['Webkit' + styleProp] = 'webkit' + eventName;
prefixes['Moz' + styleProp] = 'moz' + eventName;
prefixes['ms' + styleProp] = 'MS' + eventName;
prefixes['O' + styleProp] = 'o' + eventName.toLowerCase();

This comment has been minimized.

Copy link
@zpao

zpao Feb 28, 2016

Member

Worth noting that this is different than what we were doing (oTransitionEnd) but looking around the web, that should be fine.

This comment has been minimized.

Copy link
@milesj

milesj Feb 29, 2016

Author Contributor

Yeah it was hard to tell. Would be nice if there was a table of all the browsers, their versions, and what prefixes are used.

@zpao

This comment has been minimized.

Copy link
Member

commented Feb 28, 2016

Thanks! Let's do it and thanks for sticking with it!

zpao added a commit that referenced this pull request Feb 28, 2016

Merge pull request #6005 from milesj/synthetic-transition
Added support for synthetic animation/transition events.

@zpao zpao merged commit 5696ccf into facebook:master Feb 28, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@milesj milesj deleted the milesj:synthetic-transition branch Feb 29, 2016

@milesj

This comment has been minimized.

Copy link
Contributor Author

commented Feb 29, 2016

Awesome, thanks for the input and accepting the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.