enterprise: Tabs: TypeError: Cannot read properties of undefined (reading 'parent')

Describe the bug One scenario is that: We initialize the tabs component and then destroy/updated tabs component immediately. And then some errors occured: TypeError: Cannot read properties of undefined (reading 'parent') at Tabs.positionFocusState (tabs.js:3816:33) at tabs.js:491:12

To Reproduce

Steps to reproduce the behavior: 1.There is one mock javascript file to reproduce this issue, it just simplifies the logic in tabs.js file. TabsMock.zip 2.You can download the attachment file [TabsMock.zip] and unzip it and just run the TabsMock.js file. 3.Then you will see the error: image

The logic to reproduce this issue is that: Initialize the tabs component and then call the destroy method or updated method immediately.

Expected behavior

Version

  • ids-enterprise: v4.91.0, it can be reproduced in the earlier version.

Screenshots f1 f2

Platform

  • Infor Application/Team Name: Infor SunSystems
  • Device:
  • OS Version: Windows 11
  • Browser Name: chrome
  • Browser Version: 121.0.6167.140 (Official Build) (64-bit)

Additional context The reason for this issue might be that there is a timer, see it below. And the timer will be called after 100ms. And if destroy method OR updated method is called before the timer, the variable focusState will be set ‘undefined’, and then the error will occur. image

I just wonder that whether it is better to ‘clearTimeout’ when destroy method OR updated method is called. For example: image

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 19 (9 by maintainers)

Most upvoted comments

@tmcconechy When I upgrade IDS to 4.92.2, a new error occurred before the above error I mentioned before, so I am currently unable to verify the original error.

The new error is: TypeError: Cannot read properties of undefined (reading ‘prop’)

image

image

As a lowly, data entering end user of EQ, this repetitive error I get screenshotted below annoys me to no end after our recent transition from sales portal. I’m told it’s an Infor thing that our IT team can’t fix but that you all are on it.

I am not confident at all that this is even related to this thread but please oh please make it stop. Your little website chat people didn’t want to give me an email address.

The following error occurred, please refresh the page:

error: Uncaught TypeError: Cannot read properties of undefined (reading 'input')

url: sohoxi.js;

line: 159499

image

Hi @tmcconechy

Time ran out on me unfortunately. I have asked if @adamzhang1932 in Shanghai might pick this up and run with it. Otherwise I may be able to carry on on Monday.

Have a great weekend

Thanks @tmcconechy . That’s excellent. I’ll give that a try tomorrow.

Theo’s (.net) team may use Angular I think. But java team (inc myself, Adam and Rikesh) use ids-enterprise.

@nbeare-infor @adamzhang1932

  1. I added a guard which may fix this issue. Im going to put it in a 4.92.3 patch so you can test it. See announcements and try.
  2. I was unable to reproduce this issue, im not sure how to “run the tabMock.js” file thats a bit unclear. Can you test out my patch when its done later today and then if you still have an issue please update the steps.

We can include it in 4.93.0 if clearer. Or if you want to suggest an exact code change to fix it and I can add that? Thanks!