Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dropdown): prevent toggle click from closing in collapsed navbar #1475

Merged
merged 2 commits into from Dec 17, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/mixins/dropdown.js
Expand Up @@ -135,6 +135,7 @@ export default {
}

// Disable totally Popper.js for Dropdown in Navbar
/* istnbul ignore next: can't test popper in JSDOM */
if (!this.inNavbar) {
if (typeof Popper === 'undefined') {
warn('b-dropdown: Popper.js not found. Falling back to CSS positioning.')
Expand Down Expand Up @@ -173,7 +174,7 @@ export default {
}
this._popper = null
},
getPopperConfig () {
getPopperConfig /* istanbul ignore next: can't test popper in JSDOM */ () {
let placement = AttachmentMap.BOTTOM
if (this.dropup && this.right) {
// dropup + right
Expand Down Expand Up @@ -257,6 +258,7 @@ export default {
return
}
evt.preventDefault()
evt.stopPropagation()
if (this.disabled) {
this.visible = false
return
Expand Down