Skip to content

Commit

Permalink
Fixed transitions on some Android 4.1 devices
Browse files Browse the repository at this point in the history
On some devices (tested on a Samsung Galaxy S2), Android 4.1 is
erroneously reporting to support unprefixed transitions events, while
it’s in fact not implemented.

The solution is to test for the prefixed version first. The
WebKit-prefixed event has been moved on top of the tested events, and
while the Object properties order is not guaranteed in JavaScript (ES3,
section 4.3.3), it is the case in the targeted browser.
  • Loading branch information
bpierre committed Apr 26, 2014
1 parent d3758fc commit 057c086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transition.js
Expand Up @@ -208,9 +208,9 @@ function sniffEndEvents () {
var el = document.createElement('vue'),
defaultEvent = 'transitionend',
events = {
'webkitTransition' : 'webkitTransitionEnd',
'transition' : defaultEvent,
'mozTransition' : defaultEvent,
'webkitTransition' : 'webkitTransitionEnd'
'mozTransition' : defaultEvent
},
ret = {}
for (var name in events) {
Expand Down

0 comments on commit 057c086

Please sign in to comment.