remove RAF in transitionend
This commit is contained in:
parent
03653601d8
commit
cfdad61058
@ -121,7 +121,6 @@ const useAway =(inRef:React.Ref<HTMLElement>, handleAway:Handler)=>
|
|||||||
, []);
|
, []);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
type StyleSize = [classes:string, width:number, height:number];
|
type StyleSize = [classes:string, width:number, height:number];
|
||||||
type StylePack = Record<string, string>;
|
type StylePack = Record<string, string>;
|
||||||
type StyleCalc = Record<string, StyleSize>;
|
type StyleCalc = Record<string, StyleSize>;
|
||||||
@ -170,13 +169,10 @@ export function Collapser(inElement:HTMLElement, initialState:string, library:Re
|
|||||||
anim(userMode, userDone);
|
anim(userMode, userDone);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
frameRequest = requestAnimationFrame(()=>
|
|
||||||
{
|
{
|
||||||
inElement.setAttribute("style", "");
|
inElement.setAttribute("style", "");
|
||||||
inTransition = false;
|
inTransition = false;
|
||||||
userDone(userMode);
|
userDone(userMode);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user