Skip to content

Commit 2eecd29

Browse files
pdanpdanrstoenescu
authored andcommitted
QSlideTransition: make sure all done() are called (quasarframework#2598)
1 parent 9819d69 commit 2eecd29

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/components/slide-transition/QSlideTransition.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ export default {
1414
el.style.height = `${height}px`
1515
}
1616
el.style.transition = `height ${this.duration}ms cubic-bezier(.25, .8, .50, 1)`
17-
this.animating = true
1817
},
1918
__end (el, event) {
2019
el.style.overflowY = null
2120
el.style.height = null
2221
el.style.transition = null
2322
this.__cleanup()
2423
event !== this.lastEvent && this.$emit(event)
25-
this.animating = false
2624
},
2725
__cleanup () {
2826
clearTimeout(this.timer)
@@ -44,9 +42,9 @@ export default {
4442
let pos = 0
4543
this.el = el
4644

47-
if (this.animating === true) {
48-
this.__cleanup()
49-
pos = el.offsetHeight === el.scrollHeight ? 0 : void 0
45+
if (this.animListener) {
46+
pos = el.offsetHeight
47+
this.animListener()
5048
}
5149
else {
5250
this.lastEvent = 'hide'
@@ -67,8 +65,9 @@ export default {
6765
let pos
6866
this.el = el
6967

70-
if (this.animating === true) {
71-
this.__cleanup()
68+
if (this.animListener) {
69+
pos = el.offsetHeight
70+
this.animListener()
7271
}
7372
else {
7473
this.lastEvent = 'show'

0 commit comments

Comments
 (0)