set different trigger event in desktop and mobile by default
This commit is contained in:
parent
c9ba37ba2c
commit
c009f17651
6 changed files with 14 additions and 8 deletions
|
@ -4,8 +4,6 @@
|
|||
trigger="click"
|
||||
placement="top"
|
||||
class="extra-button-popover"
|
||||
:offset="5"
|
||||
:container="false"
|
||||
>
|
||||
<div slot="popover">
|
||||
<div class="dropdown-menu">
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
<v-popover
|
||||
trigger="click"
|
||||
class="moderation-tools-popover"
|
||||
:container="false"
|
||||
placement="bottom-end"
|
||||
:offset="5"
|
||||
@show="showDropDown = true"
|
||||
@hide="showDropDown = false"
|
||||
>
|
||||
|
|
|
@ -179,9 +179,6 @@
|
|||
ref="statusPreviewPopper"
|
||||
popover-class="status-popover"
|
||||
placement="top-start"
|
||||
trigger="hover"
|
||||
:offset="5"
|
||||
:container="false"
|
||||
:popper-options="{
|
||||
modifiers: {
|
||||
preventOverflow: { padding: 50, boundariesElement: 'viewport' },
|
||||
|
|
|
@ -29,6 +29,7 @@ import VueClickOutside from 'v-click-outside'
|
|||
import PortalVue from 'portal-vue'
|
||||
import VBodyScrollLock from './directives/body_scroll_lock'
|
||||
import VTooltip from 'v-tooltip'
|
||||
import MobileDetect from 'mobile-detect'
|
||||
|
||||
import afterStoreSetup from './boot/after_store.js'
|
||||
|
||||
|
@ -41,7 +42,13 @@ Vue.use(VueChatScroll)
|
|||
Vue.use(VueClickOutside)
|
||||
Vue.use(PortalVue)
|
||||
Vue.use(VBodyScrollLock)
|
||||
Vue.use(VTooltip)
|
||||
Vue.use(VTooltip, {
|
||||
popover: {
|
||||
defaultTrigger: (new MobileDetect(window.navigator.userAgent)).mobile() ? 'click' : 'hover',
|
||||
defaultContainer: false,
|
||||
defaultOffset: 5
|
||||
}
|
||||
})
|
||||
|
||||
const i18n = new VueI18n({
|
||||
// By default, use the browser locale, we will update it if neccessary
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue