wobsoriano / vue-winbox

A Vue wrapper component for WinBox.js.
https://vue-winbox.vercel.app
MIT License
160 stars 14 forks source link

Cannot read properties of null (reading 'classList') #14

Closed ipacs13 closed 1 year ago

ipacs13 commented 1 year ago

Hi!

This component is so cool! However, I am having an issue currently on how to deal with this component in a modal.

  1. I put VueWinBox in a modal component.

  2. I close the modal

  3. When I open the modal again, I see this issue

    image
  4. VueWinBox doesn't load anymore.

This is my code:

 <div
    @click.exact="close"
    class="modal fade slide-right"
    tabindex="-1"
    role="dialog"
    aria-hidden="true"
  >
    <ClientOnly>
      <VueWinBox
        v-if="editorOpen && viewportWidth >= 992"
        ref="winboxRef"
        :options="options"
        @close="close"
      >
        <!-- test only -->
        <iframe
          class="preview real"
          id="display-iframe"
          :src="previewUrl"
          frameborder="0"
          :key="previewUrl"
          @click.stop=""
        />
      </VueWinBox>
    </ClientOnly>
wobsoriano commented 1 year ago

Fixed in https://github.com/wobsoriano/vue-winbox/pull/12