Skip to content

Commit 7ffd776

Browse files
committed
fix(ie): use scrollHeight
1 parent 9f30d8d commit 7ffd776

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/components/DynamicScroller.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import RecycleScroller from './RecycleScroller.vue'
3434
import { props, simpleArray } from './common'
3535
36-
const MAX_SCROLL = 9999999999
37-
3836
export default {
3937
name: 'DynamicScroller',
4038
@@ -193,12 +191,12 @@ export default {
193191
const el = this.$el
194192
// Item is inserted to the DOM
195193
this.$nextTick(() => {
196-
el.scrollTop = MAX_SCROLL
194+
el.scrollTop = el.scrollHeight
197195
// Item sizes are computed
198196
const cb = () => {
199-
el.scrollTop = MAX_SCROLL
197+
el.scrollTop = el.scrollHeight
200198
requestAnimationFrame(() => {
201-
el.scrollTop = MAX_SCROLL
199+
el.scrollTop = el.scrollHeight
202200
if (this.$_undefinedSizes === 0) {
203201
this.$_scrollingToBottom = false
204202
} else {

0 commit comments

Comments
 (0)