Skip to content

Commit 303ecb1

Browse files
authored
fix(ui5-wizard): adjust content and navigator paddings based on spec (#4479)
FIXES: #3612
1 parent f515f3d commit 303ecb1

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

packages/fiori/src/Wizard.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,6 @@ class Wizard extends UI5Element {
314314
return 25;
315315
}
316316

317-
static get CONTENT_TOP_OFFSET() {
318-
return 32;
319-
}
320-
321317
static get staticAreaTemplate() {
322318
return WizardPopoverTemplate;
323319
}
@@ -418,7 +414,7 @@ class Wizard extends UI5Element {
418414
storeStepScrollOffsets() {
419415
this.stepScrollOffsets = this.slottedSteps.map(step => {
420416
const contentItem = this.getStepWrapperByRefId(step._id);
421-
return contentItem.offsetTop + contentItem.offsetHeight - Wizard.CONTENT_TOP_OFFSET;
417+
return contentItem.offsetTop + contentItem.offsetHeight;
422418
});
423419
}
424420

@@ -988,8 +984,11 @@ class Wizard extends UI5Element {
988984
*/
989985
switchSelectionFromOldToNewStep(selectedStep, stepToSelect, stepToSelectIndex, changeWithClick) {
990986
if (selectedStep && stepToSelect) {
991-
selectedStep.selected = false;
992-
stepToSelect.selected = true;
987+
// keep the selection if next step is disabled
988+
if (!stepToSelect.disabled) {
989+
selectedStep.selected = false;
990+
stepToSelect.selected = true;
991+
}
993992

994993
this.fireEvent("step-change", {
995994
step: stepToSelect,

packages/fiori/src/themes/Wizard.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
.ui5-wiz-content-item {
2525
display: block;
2626
box-sizing: border-box;
27-
padding-bottom: 2rem;
27+
padding: 1rem 2rem;
2828
}
2929

3030
.ui5-wiz-content-item[hidden] {
@@ -65,7 +65,7 @@
6565
.ui5-wiz-nav {
6666
box-sizing: border-box;
6767
height: 4rem;
68-
padding: 0.875rem 1rem;
68+
padding: 0.875rem 2rem;
6969
-webkit-user-select: none;
7070
-moz-user-select: none;
7171
-ms-user-select: none;

0 commit comments

Comments
 (0)