Skip to content

Commit a64eaf8

Browse files
author
Maxi Dietz
authored
fix(ui5-wizard): check if tab has a focusable element (#3904)
1 parent 2ebc6a7 commit a64eaf8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/fiori/src/Wizard.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const metadata = {
9595
* @defaultvalue 0.7
9696
* @since 1.0.0-rc.13
9797
*/
98-
stepSwitchThreshold: {
98+
stepSwitchThreshold: {
9999
type: Float,
100100
defaultValue: STEP_SWITCH_THRESHOLDS.DEFAULT,
101101
},
@@ -666,8 +666,10 @@ class Wizard extends UI5Element {
666666
const newlySelectedIndex = this.slottedSteps.indexOf(stepToSelect);
667667
const firstFocusableElement = await getFirstFocusableElement(stepToSelect.firstElementChild);
668668

669-
// Focus the first focusable element within the step content corresponding to the currently focused tab
670-
firstFocusableElement.focus();
669+
if (firstFocusableElement) {
670+
// Focus the first focusable element within the step content corresponding to the currently focused tab
671+
firstFocusableElement.focus();
672+
}
671673

672674
// If the currently selected (active) step is clicked,
673675
// just scroll to its starting point and stop.

0 commit comments

Comments
 (0)