Skip to content

Commit ea4bb0c

Browse files
committed
Prefix transition in workaround
1 parent 7222ca4 commit ea4bb0c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/composables/withWorkaround.spec.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ describe("withWorkaround", () => {
5252

5353
it("should perform a second transition", () => {
5454
const style = wrapper.childAt(0).props().style;
55-
assert.deepEqual(style, { opacity: 1.0, transition: "opacity 1ms linear 10ms" });
55+
const transition = "opacity 1ms linear 10ms";
56+
assert.deepEqual(style, { opacity: 1.0, transition, WebkitTransition: transition });
5657
});
5758

5859
describe("when second transition ends", () => {

src/composables/withWorkaround.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ export const withWorkaround = combine(
3737
key: "workaround",
3838
style: { opacity: 0.9 },
3939
};
40+
const transition = `opacity 1ms linear ${firstPropertyDelay}ms`;
4041
if (inTransition) {
4142
workaroundProps.onTransitionEnd = workaroundHandler;
42-
workaroundProps.style = { opacity: 1.0, transition: `opacity 1ms linear ${firstPropertyDelay}ms` };
43+
workaroundProps.style = { opacity: 1.0, transition, WebkitTransition: transition };
4344
}
4445
return {
4546
children: [<span {...workaroundProps } />, ...Children.toArray(children)],

0 commit comments

Comments
 (0)