From ee2f025585a1a8f00c0ff35a3b1166f0a2647887 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 24 Mar 2017 14:33:56 +0800 Subject: [PATCH] Fix badge style in Maxthon, close #5477 --- components/badge/ScrollNumber.tsx | 9 +-------- components/badge/style/index.less | 11 +---------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/components/badge/ScrollNumber.tsx b/components/badge/ScrollNumber.tsx index 67249466b4..5664cb2970 100644 --- a/components/badge/ScrollNumber.tsx +++ b/components/badge/ScrollNumber.tsx @@ -1,7 +1,5 @@ import React from 'react'; import { createElement, Component } from 'react'; -import { findDOMNode } from 'react-dom'; -import isCssAnimationSupported from '../_util/isCssAnimationSupported'; import assign from 'object-assign'; import omit from 'omit.js'; @@ -40,12 +38,6 @@ export default class ScrollNumber extends Component { }; } - componentDidMount() { - if (!isCssAnimationSupported()) { - findDOMNode(this).className += ' not-support-css-animation'; - } - } - getPositionByNum(num, i) { if (this.state.animateStarted) { return 10 + num; @@ -109,6 +101,7 @@ export default class ScrollNumber extends Component { className: `${this.props.prefixCls}-only`, style: { transition: removeTransition && 'none', + msTransform: `translateY(${-position * 100}%)`, WebkitTransform: `translateY(${-position * 100}%)`, transform: `translateY(${-position * 100}%)`, }, diff --git a/components/badge/style/index.less b/components/badge/style/index.less index b4b16c74b2..24000e6a97 100644 --- a/components/badge/style/index.less +++ b/components/badge/style/index.less @@ -123,21 +123,12 @@ overflow: hidden; &-only { display: inline-block; - transition: transform .3s @ease-in-out; + transition: all .3s @ease-in-out; height: @badge-height; > p { height: @badge-height; } } - // for IE8/9 display - &.not-support-css-animation &-only { - > p { - display: none; - &.current { - display: block; - } - } - } } @keyframes antZoomBadgeIn {