If you're using Sencha Touch 2.x, you will probably face problems on at least Android System WebView version >= 44.0.2403.39 and Google Chrome Canary >= 45.0.2430.0 (Blink version unknown to me), and possibly earlier versions. Fortunately this System WebView is in Beta at the moment, so fix your apps before it leaves Beta!
In my case, I was using the Sencha Picker Component extensively. The Picker component is a modal "drop down menu" with a mask behind it. The mask prevents the user from interacting with other UI elements when the Picker is visible. Unfortunately, on the affected versions of Blink (Google's layout engine), the mask does not hide itself when the Picker is dismissed, continuing to block the UI...
After some investigation, I have found that the root cause is that animation events are broken on affected versions of Blink.
By default, the Picker component performs a slideOut animation when being dismissed. A series of events is fired during this animation, which should include "transitionend" folloed by "animationend". On affected versions of Blink, the "animationend" event does not fire...
It seems that the "animationend" event fails to fire because Sencha is looking out for the "transitionend" event on the "-webkit-transform" property only - however, the affected Blink versions return "transitionend" on the "transform" property instead.
This jsFiddle demonstrates the problem:
http://jsfiddle.net/tjwoon/o2v34neq/I have filed a bug report with the Chromium Project (
Issue 500126). I hope it is fixed before the new WebView leaves Beta!
UPDATE 19 June 2015: Well it looks like the Chromium project is undecided whether to use "transform" or "-webkit-transform" (
Issue 493177). In case they do not decide to revert to the old behavior by the time the System Webview hits production, I have added a workaround which fixes all Sencha CSS Transition animations.
The patch:
Index: touch/src/fx/runner/CssTransition.js
===================================================================
--- touch/src/fx/runner/CssTransition.js (revision 22505)
+++ touch/src/fx/runner/CssTransition.js (revision 22506)
@@ -23,7 +23,11 @@
id = target.id;
if (id && this.runningAnimationsData.hasOwnProperty(id)) {
- this.refreshRunningAnimationsData(Ext.get(target), [e.browserEvent.propertyName]);
+ // Workaround: Sencha does not fire animationEnd event in Android System Webview >=44.0.2403.39
+ var prop = e.browserEvent.propertyName;
+ var propNames = [prop];
+ if(prop == "transform") propNames.push("-webkit-transform");
+ if(prop == "-webkit-transform") propNames.push("transform");+
+ this.refreshRunningAnimationsData(Ext.get(target), propNames);
}
},
Instructions:
- Open the Sencha file: touch/src/fx/runner/CssTransition.js
- Look for the line
this.refreshRunningAnimationsData(Ext.get(target), [e.browserEvent.propertyName]); - Replace that line with this:
// Workaround: Sencha does not fire animationEnd event in Android System Webview >=44.0.2403.39
var propNames = [e.browserEvent.propertyName];
if(e.browserEvent.propertyName == "transform") propNames.push("-webkit-transform");
this.refreshRunningAnimationsData(Ext.get(target), propNames);
Explanation:
The new Webview problem affects only the "transform"/"-webkit-transform" properties, which is an "aliased" propertyName with additional special rules for common use cases (
source). My workaround just makes Sencha check for animationEnd listeners on both "transform" and "-webkit-transform" whenever a transitionEnd event with either propertyName is received.
Disclaimer: I am not familiar with internal Sencha architecture, but in my testing nothing is broken by this workaround.
UPDATE 29 July 2015: This is now permanent behavior for Chrome - the Chromium team has closed
the issue.