Akryum / vue-virtual-scroller

⚡️ Blazing fast scrolling for any amount of data
https://vue-virtual-scroller-demo.netlify.app
9.43k stars 901 forks source link

e.getBoundingClientRect is not a function #793

Open lpschz opened 1 year ago

lpschz commented 1 year ago

Describe the bug

// ../../../node_modules/vue-virtual-scroller/dist/vue-virtual-scroller.esm.js at line 659:27
      const { $el: el, direction } = this;
      const isVertical = direction === 'vertical';
      let scrollState;

      if (this.pageMode) {
        const bounds = el.getBoundingClientRect();
        const boundsSize = isVertical ? bounds.height : bounds.width;
        let start = -(isVertical ? bounds.top : bounds.left);
        let size = isVertical ? window.innerHeight : window.innerWidth;
        if (start < 0) {
          size += start;

Reproduction

-

System Info

-

Used Package Manager

npm

Validations