Skip to content

q-tab offsetwidth error #17664

@Muslim-Boy

Description

@Muslim-Boy

What happened?

When I navigate from a page where q-tab is used to any other page, I get the following error:

QTabPanels-5q1hpjJq.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'offsetWidth') at QTabPanels-5q1hpjJq.js:1:6026
at index-lUfzcXt5.js:36:13635

What did you expect to happen?

The issue is specifically coming from this part:

The problem only occurs when this part is added.

Reproduction URL

https://codepen.io/rstoenescu/pen/VgQbdx

How to reproduce?

https://codepen.io/rstoenescu/pen/VgQbdx

Flavour

Quasar CLI (@quasar/cli | @quasar/app)

Areas

Components (quasar)

Platforms/Browsers

Firefox, Chrome, Microsoft Edge

Quasar info output

<q-card v-if="tabsLoaded" class="shdw-card r-8 q-mt-md">
      <q-card-section>
        <q-tabs v-model="tab" inline-label :breakpoint="0" align="justify" color="primary" class="text-primary sh-tabs">
          <q-tab v-for="(item,index) in tabs" 
          :name="item.name" 
          :label="t(item.title)"
          :key="index"
          />
        </q-tabs>
      </q-card-section>
    </q-card>

Relevant log output

QTabPanels-5q1hpjJq.js:1 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'offsetWidth')
    at QTabPanels-5q1hpjJq.js:1:6026
    at index-lUfzcXt5.js:36:13635

Additional context

Apologies, I wasn't able to provide the code snippet earlier. The issue is happening in a more global context. It occurs when I switch to another menu in the layout, i.e., when the router is changed, the problem appears.

I am sory i use quasar version 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions