Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Commit fa7aa74

Browse files
committed
restrict v-tippy version
1 parent f601b01 commit fa7aa74

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ class User extends Authenticatable
5858
- install JS dependencies
5959

6060
```bash
61-
yarn add vue axios vue-tippy vuemit vuedraggable vue-notif
61+
yarn add vue axios vue-tippy@v1 vuemit vuedraggable vue-notif
6262
# or
63-
npm install vue axios vue-tippy vuemit vuedraggable vue-notif --save
63+
npm install vue axios vue-tippy@v1 vuemit vuedraggable vue-notif --save
6464
```
6565

6666
- add this one liner to your main js file and run `npm run watch` to compile your `js/css` files.

src/resources/assets/js/manager.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@ window.Vue = require('vue')
22
window.EventHub = require('vuemit')
33
Vue.use(require('vue-tippy'), {
44
arrow: true,
5-
touchHold: true
5+
touchHold: true,
6+
inertia: true,
7+
performance: true
8+
})
9+
window.addEventListener('scroll', function () {
10+
const poppers = document.querySelectorAll('.tippy-popper')
11+
12+
for (const popper of poppers) {
13+
const tooltip = popper._reference._tippy
14+
15+
if (tooltip.state.visible) {
16+
tooltip.popperInstance.disableEventListeners()
17+
tooltip.hide()
18+
}
19+
}
620
})
721

822
// axios

0 commit comments

Comments
 (0)