File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 11import Popper from 'popper.js'
22import { Vue } from '../vue'
33import { NAME_DROPDOWN } from '../constants/components'
4+ import { HAS_TOUCH_SUPPORT } from '../constants/env'
45import {
56 EVENT_NAME_CLICK ,
67 EVENT_NAME_HIDDEN ,
@@ -121,6 +122,9 @@ export const dropdownMixin = Vue.extend({
121122 // boundaries when boundary is anything other than `scrollParent`
122123 // See: https://github.com/twbs/bootstrap/issues/24251#issuecomment-341413786
123124 return this . boundary !== 'scrollParent' && ! this . inNavbar ? 'position-static' : ''
125+ } ,
126+ hideDelay ( ) {
127+ return this . inNavbar ? ( HAS_TOUCH_SUPPORT ? 300 : 50 ) : 0
124128 }
125129 } ,
126130 watch : {
@@ -386,7 +390,7 @@ export const dropdownMixin = Vue.extend({
386390 const { target } = event
387391 if ( this . visible && ! contains ( this . $refs . menu , target ) && ! contains ( this . toggler , target ) ) {
388392 this . clearHideTimeout ( )
389- this . $_hideTimeout = setTimeout ( ( ) => this . hide ( ) , this . inNavbar ? 300 : 0 )
393+ this . $_hideTimeout = setTimeout ( ( ) => this . hide ( ) , this . hideDelay )
390394 }
391395 } ,
392396 // Document click-out listener
You can’t perform that action at this time.
0 commit comments