hexo-theme-linen 1.0.40 → 1.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-linen",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "A clean Hexo theme",
5
5
  "main": "index.js",
6
6
  "homepage": "https://github.com/lynanbreeze/hexo-theme-linen",
@@ -3066,6 +3066,7 @@ class CSSAnimation {
3066
3066
  easing = DEFAULT_EASING
3067
3067
  } = props;
3068
3068
  this.onFinish = onFinish;
3069
+ this._duration = duration;
3069
3070
 
3070
3071
  // support only transform and opacity
3071
3072
  const prop = transform ? "transform" : "opacity";
@@ -3113,6 +3114,11 @@ class CSSAnimation {
3113
3114
  */
3114
3115
  _onTransitionEnd(e) {
3115
3116
  if (e.target === this._target) {
3117
+ // Chrome can dispatch a premature transitionend with elapsedTime 0
3118
+ // after scrolling. Do not tear down a transition that has not run yet.
3119
+ if (e.type === "transitionend" && e.elapsedTime === 0 && this._duration > 0) {
3120
+ return;
3121
+ }
3116
3122
  this._finalizeAnimation();
3117
3123
  }
3118
3124
  }