File tree 2 files changed +4
-8
lines changed
packages/vue-collapsed/src
2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 6
6
/cypress /screenshots /
7
7
.vscode /*
8
8
! .vscode /extensions.json
9
+ .idea
9
10
* .tgz
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import type { Ref } from 'vue'
4
4
5
5
type RefEl = Ref < HTMLElement | null >
6
6
7
- const isFirefox = ( ) => typeof navigator !== 'undefined' && navigator . userAgent . includes ( 'Firefox' )
8
-
9
7
export function getComputedHeight ( el : RefEl ) {
10
8
if ( ! el . value ) return 0
11
9
return parseFloat ( getComputedStyle ( el . value ) . height )
@@ -17,13 +15,10 @@ export function getTransitionProp(el: RefEl) {
17
15
const { transition } = getComputedStyle ( el . value )
18
16
19
17
// If transition is not defined via CSS, return the default one referencing the auto duration
20
- if (
21
- transition === 'all 0s ease 0s' ||
22
- ( isFirefox ( ) &&
23
- transition ===
24
- 'all' ) /* Since Firefox v124, Gecko returns transition 'all' instead of 'all 0s ease 0s' */
25
- )
18
+ if ( transition === 'all 0s ease 0s' || transition === 'all' ) {
19
+ /* Since Firefox v124 and Chromium v128, their rendering engine transition computes 'all' instead of 'all 0s ease 0s' */
26
20
return { transition : DEFAULT_TRANSITION }
21
+ }
27
22
28
23
return { transition }
29
24
}
You can’t perform that action at this time.
0 commit comments