File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
ui/src/components/slide-transition Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export default createComponent({
3939 }
4040
4141 function begin ( el , height , done ) {
42- el . style . overflowY = 'hidden'
42+ // here overflowY is 'hidden'
4343 if ( height !== void 0 ) {
4444 el . style . height = `${ height } px`
4545 }
@@ -61,12 +61,14 @@ export default createComponent({
6161 let pos = 0
6262 element = el
6363
64+ // if animationg overflowY is already 'hidden'
6465 if ( animating === true ) {
6566 cleanup ( )
6667 pos = el . offsetHeight === el . scrollHeight ? 0 : void 0
6768 }
6869 else {
6970 lastEvent = 'hide'
71+ el . style . overflowY = 'hidden'
7072 }
7173
7274 begin ( el , pos , done )
@@ -95,6 +97,9 @@ export default createComponent({
9597 }
9698 else {
9799 lastEvent = 'show'
100+ // we need to set overflowY 'hidden' before calculating the height
101+ // or else we get small differences
102+ el . style . overflowY = 'hidden'
98103 pos = el . scrollHeight
99104 }
100105
You can’t perform that action at this time.
0 commit comments