* change event listener range, fix jump bug. bug #36519.
This commit is contained in:
@@ -22,13 +22,13 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #ffffff;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.step > a
|
||||
{
|
||||
position: relative;
|
||||
left: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.step:first-child
|
||||
@@ -71,12 +71,12 @@
|
||||
.step.disabled
|
||||
{
|
||||
background-color: #ffffff;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.step.disabled > a
|
||||
{
|
||||
color: #c4c4c4;
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
let isPromptDesignDirty = false;
|
||||
|
||||
(function()
|
||||
{
|
||||
const steps = document.getElementsByClassName('steps')[0];
|
||||
@@ -112,11 +114,25 @@
|
||||
step.previousElementSibling.lastElementChild.classList.remove('solid-arrow');
|
||||
}
|
||||
});
|
||||
|
||||
const link = step.querySelector('a');
|
||||
if(!link) continue;
|
||||
link.addEventListener('click', function(e)
|
||||
{
|
||||
if(!isPromptDesignDirty) return;
|
||||
const result = validateForm();
|
||||
if(!result) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
const submitButton = document.getElementById('saveButton');
|
||||
if(!submitButton) return;
|
||||
submitButton.click();
|
||||
})
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
let isPromptDesignDirty = false;
|
||||
(function()
|
||||
{
|
||||
const backButton = document.querySelector('.design-steps button:first-child');
|
||||
|
||||
Reference in New Issue
Block a user