Skip to content

Commit

Permalink
[BUG #8965] Removed unnecessary browser check
Browse files Browse the repository at this point in the history
  • Loading branch information
wittemann committed Feb 26, 2015
1 parent 833ffb8 commit 11def15
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions framework/source/class/qx/ui/mobile/layout/Card.js
Expand Up @@ -291,15 +291,8 @@ qx.Class.define("qx.ui.mobile.layout.Card",
var fromElement = this.__currentWidget.getContainerElement();
var toElement = widget.getContainerElement();

var onAnimationEnd = qx.lang.Function.bind(this._onAnimationEnd, this);

if(qx.core.Environment.get("browser.name") == "iemobile" || qx.core.Environment.get("browser.name") == "ie") {
qx.bom.Event.addNativeListener(fromElement, "MSAnimationEnd", onAnimationEnd, false);
qx.bom.Event.addNativeListener(toElement, "MSAnimationEnd", onAnimationEnd, false);
} else {
qx.event.Registration.addListener(fromElement, "animationEnd", this._onAnimationEnd, this);
qx.event.Registration.addListener(toElement, "animationEnd", this._onAnimationEnd, this);
}
qx.event.Registration.addListener(fromElement, "animationEnd", this._onAnimationEnd, this);
qx.event.Registration.addListener(toElement, "animationEnd", this._onAnimationEnd, this);

var fromCssClasses = this.__getAnimationClasses("out");
var toCssClasses = this.__getAnimationClasses("in");
Expand Down Expand Up @@ -339,13 +332,8 @@ qx.Class.define("qx.ui.mobile.layout.Card",
var fromElement = this.__currentWidget.getContainerElement();
var toElement = this.__nextWidget.getContainerElement();

if(qx.core.Environment.get("browser.name") == "iemobile" || qx.core.Environment.get("browser.name") == "ie") {
qx.bom.Event.removeNativeListener(fromElement, "MSAnimationEnd", this._onAnimationEnd, false);
qx.bom.Event.removeNativeListener(toElement, "MSAnimationEnd", this._onAnimationEnd, false);
} else {
qx.event.Registration.removeListener(fromElement, "animationEnd", this._onAnimationEnd, this);
qx.event.Registration.removeListener(toElement, "animationEnd", this._onAnimationEnd, this);
}
qx.event.Registration.removeListener(fromElement, "animationEnd", this._onAnimationEnd, this);
qx.event.Registration.removeListener(toElement, "animationEnd", this._onAnimationEnd, this);

qx.bom.element.Class.removeClasses(fromElement, this.__getAnimationClasses("out"));
qx.bom.element.Class.removeClasses(toElement, this.__getAnimationClasses("in"));
Expand Down

0 comments on commit 11def15

Please sign in to comment.