Skip to content

Commit 24ef1e6

Browse files
authored
fix(dropdown): prevent toggle click from closing in collapsed navbar (#1475)
Fixes #1474
1 parent 534b4b7 commit 24ef1e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mixins/dropdown.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export default {
135135
}
136136

137137
// Disable totally Popper.js for Dropdown in Navbar
138+
/* istnbul ignore next: can't test popper in JSDOM */
138139
if (!this.inNavbar) {
139140
if (typeof Popper === 'undefined') {
140141
warn('b-dropdown: Popper.js not found. Falling back to CSS positioning.')
@@ -173,7 +174,7 @@ export default {
173174
}
174175
this._popper = null
175176
},
176-
getPopperConfig () {
177+
getPopperConfig /* istanbul ignore next: can't test popper in JSDOM */ () {
177178
let placement = AttachmentMap.BOTTOM
178179
if (this.dropup && this.right) {
179180
// dropup + right
@@ -257,6 +258,7 @@ export default {
257258
return
258259
}
259260
evt.preventDefault()
261+
evt.stopPropagation()
260262
if (this.disabled) {
261263
this.visible = false
262264
return

0 commit comments

Comments
 (0)