+5
-1
lines changedFilter options
+5
-1
lines changed Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
1
1
import Popper from 'popper.js'
2
2
import { Vue } from '../vue'
3
3
import { NAME_DROPDOWN } from '../constants/components'
4
+
import { HAS_TOUCH_SUPPORT } from '../constants/env'
4
5
import {
5
6
EVENT_NAME_CLICK,
6
7
EVENT_NAME_HIDDEN,
@@ -121,6 +122,9 @@ export const dropdownMixin = Vue.extend({
121
122
// boundaries when boundary is anything other than `scrollParent`
122
123
// See: https://github.com/twbs/bootstrap/issues/24251#issuecomment-341413786
123
124
return this.boundary !== 'scrollParent' && !this.inNavbar ? 'position-static' : ''
125
+
},
126
+
hideDelay() {
127
+
return this.inNavbar ? (HAS_TOUCH_SUPPORT ? 300 : 50) : 0
124
128
}
125
129
},
126
130
watch: {
@@ -386,7 +390,7 @@ export const dropdownMixin = Vue.extend({
386
390
const { target } = event
387
391
if (this.visible && !contains(this.$refs.menu, target) && !contains(this.toggler, target)) {
388
392
this.clearHideTimeout()
389
-
this.$_hideTimeout = setTimeout(() => this.hide(), this.inNavbar ? 300 : 0)
393
+
this.$_hideTimeout = setTimeout(() => this.hide(), this.hideDelay)
390
394
}
391
395
},
392
396
// Document click-out listener
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4