Skip to content
Permalink
Browse files

fix(modal): fix scroll to top issue when modal has `no-fade` set (#4004)

  • Loading branch information...
tmorehouse committed Sep 3, 2019
1 parent 3aa78fd commit 332b79fe8511c0f2b8401c34c80abfb0f4138920
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/components/modal/modal.js
@@ -775,11 +775,14 @@ export const BModal = /*#__PURE__*/ Vue.extend({
: autoFocus === 'close' && close
? close.$el || close
: content
// Make sure top of modal is showing (if longer than the viewport)
// Focus the element
attemptFocus(el)
if (el === content) {
modal.scrollTop = 0
// Make sure top of modal is showing (if longer than the viewport)
this.$nextTick(() => {
modal.scrollTop = 0
})
}
attemptFocus(el)
}
})
}

0 comments on commit 332b79f

Please sign in to comment.
You can’t perform that action at this time.