vue-loading-overlay icon indicating copy to clipboard operation
vue-loading-overlay copied to clipboard

`isActive` watcher does not start with initial value when used as a plugin

Open blasdfaa opened this issue 1 year ago • 0 comments

If you use it as a plugin and launch the loader via useLoader().show(), page scrolling is not blocked.

I'm guessing the watcher's isActive needs to be set to immediate: true. https://github.com/ankurk91/vue-loading-overlay/blob/a64a1c88989894a29de0ca78500bb529021e4da6/src/js/Component.vue#L142-L148

[x] Bug report => search github for a similar issue or PR before submitting
[ ] Feature request
[ ] Other, please describe

Tell about your platform

  • Vue.js version : 3.3.4
  • Browser name and version : Chrome 117.0.5938.149
  • This package version : 6.0.3

Current behavior Page scrolling is not blocked when the loader is active, the .vl-shown class is not added to the body

Expected behavior Page scrolling must be blocked when the loader is active, the .vl-shown class must be added to the body

Minimal reproduction of the problem with instructions Click on show loader button and try scroll page https://stackblitz.com/edit/vitejs-vite-t1v3k9?file=src%2Fcomponents%2FHelloWorld.vue

blasdfaa avatar Oct 13 '23 15:10 blasdfaa