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

ui5-busy-indicator crashes in ui5-responsive-popover during initial render #4412

Closed
1 of 4 tasks
charlie-maloney opened this issue Dec 1, 2021 · 2 comments
Closed
1 of 4 tasks
Assignees
Labels
bug This issue is a bug in the code High Prio TOPIC RD

Comments

@charlie-maloney
Copy link

Bug Description

When rendering an ui5-responsive-popover for the first time and immediately opening it with an active ui5-busy-indicator inside, the site crashes with a JS runtime error:

TypeError: Cannot read properties of null (reading 'focus')

Think we should check to make sure we have element before we call focus(). i.e.

this.shadowRoot.querySelector(".ui5-busy-indicator-busy-area")?.focus();

Expected Behavior

Busy Indicator should be active and no error should be thrown
(almost exact same issue as #4108)
@MarcusNotheis FYI

Steps to Reproduce

Isolated Example

https://codesandbox.io/s/table-dialog-busy-forked-6l1zd?file=/src/App.js

Context

  • UI5 Web Components version: 1.0.0-rc.15 (and latest snapshots as well)
  • OS/Platform: macOS
  • Browser: Chrome
  • Affected component: ui5-busy-indicator

Log Output / Stack Trace / Screenshots

TypeError: Cannot read properties of null (reading 'focus')
HTMLElement._redirectFocus
node_modules/@ui5/webcomponents/dist/BusyIndicator.js:265
  262 | 		}
  263 | 
  264 | 		event.preventDefault();
> 265 | 		this.shadowRoot.querySelector(".ui5-busy-indicator-busy-area").focus();
  266 | 	}
  267 | }
  268 | 

Priority

  • Low
  • Medium
  • High
  • Very High

The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria:

  • Breaks entire application or system - High or Very High
  • Accessibility issue - Medium or High
  • Functional issue - Medium or High
  • Visual issue - Low or Medium

Note: The priority might be re-evaluated by the issue processor.

@georgimkv georgimkv self-assigned this Dec 2, 2021
@georgimkv
Copy link
Contributor

georgimkv commented Dec 2, 2021

Hi @charlie-maloney

I retested your example with a build using the last commit in the main branch and I didn't get a crash. The PR which closes #4108 also solves your error too.
You can consume the fix in the next patch release of the ui5-webcomponents library!

Regards,
Georgi

@georgimkv georgimkv added bug This issue is a bug in the code High Prio TOPIC RD labels Dec 2, 2021
@charlie-maloney
Copy link
Author

Hi @charlie-maloney

I retested your example with a build using the last commit in the main branch and I didn't get a crash. The PR which closes #4108 also solves your error too. You can consume the fix in the next patch release of the ui5-webcomponents library!

Regards, Georgi

Great, thanks @gmkv!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug in the code High Prio TOPIC RD
Projects
Status: Completed
Development

No branches or pull requests

2 participants