Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs throw if a child tab is immediately appended #1140

Closed
damyanpetev opened this issue Apr 9, 2024 · 0 comments · Fixed by #1142
Closed

Tabs throw if a child tab is immediately appended #1140

damyanpetev opened this issue Apr 9, 2024 · 0 comments · Fixed by #1142
Assignees
Labels
bug Something isn't working status: resolved tab

Comments

@damyanpetev
Copy link
Member

Description

Tabs throw if a child tab is appended synchronously immediately after being added to DOM. This is caused by the constructor-initialized mutation observer/controller and it's handler referencing the internal resize observer which is created on firstUpdated, so if the mutation happens immediately after connecting to the DOM the resize observer doesn't exist yet.

Steps to reproduce

On https://igniteui.github.io/igniteui-webcomponents/?path=/story/tabs--basic or any page with registered tabs component
Run the following:

var tabs = document.createElement('igc-tabs');
var tab = document.createElement('igc-tab');
document.body.appendChild(tabs);
tabs.appendChild(tab);

Result

image

Expected result

There should be no error and the tabs should work as expected.

@damyanpetev damyanpetev added bug Something isn't working 🆕 status: new The issue is new and will be reviewed when somebody picks it up. tab labels Apr 9, 2024
@rkaraivanov rkaraivanov self-assigned this Apr 9, 2024
@rkaraivanov rkaraivanov added 🛠️ status: in-development and removed 🆕 status: new The issue is new and will be reviewed when somebody picks it up. labels Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status: resolved tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants