scania-digital-design-system / tegel

Tegel Design System
https://tegel.scania.com
MIT License
17 stars 13 forks source link

[Bug report]: Cannot read properties of null (reading 'getBoundingClientRect') - tds-slider #410

Closed gokberknur closed 1 month ago

gokberknur commented 11 months ago

Requirements before reporting

Package versions

@scania/tegel@1.1.0

Browser

Chrome

Framework

Angular

Version

Angular 16

Reproduction steps

  1. Add tds-slider on your page
  2. visit page where is your slider component (no error here logged)
  3. then visit another page
  4. come back to page where is your tds-slider( now you will see error) ...
Screenshot 2023-11-06 at 17 08 31

Code example

` <tds-slider min="0" max="500" step="1" value="50" ticks="4" show-tick-numbers snap label="Range" tooltip ngDefaultControl

rangeSlider

            [(ngModel)]="radius"
            controls
            thumb-size="sm"
          ></tds-slider>`

Screenshots

Add/Copy screenshot here

Screenshot 2023-11-06 at 17 08 31

Expected behaviour

Component "tds-slider" should not log any errors.

Console errors

cpoi.component.html:72 TypeError: Cannot read properties of null (reading 'getBoundingClientRect')

Contact information

No response

alfredskeden commented 10 months ago

Hello @gokberknur I've tried to reproduce this error but without success.

Can you please checkout my code here https://github.com/alfredskeden/tegel-tds-slider-test/tree/main

And please update that code there to make it break by opening a PR in there? Or am I missing something in your produce steps to get this error? Would help a alot. thanks best regards

theJohnnyMe commented 1 month ago

I am closing it as the fix is released and did help.