Skip to content

Commit

Permalink
try to fix scroll-to by using scrollTo instead of scrollIntoView
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedhamidawan committed Apr 27, 2024
1 parent e1d35aa commit 942a94c
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,10 @@ watch(
// on full page view, scroll to the active step card in the steps section
if (props.isFullPage) {
if (nodeId !== undefined && card) {
// scroll to the input steps header
if (isAnInput) {
const inputHeader = stepsDiv.value?.querySelector(`.invocation-inputs-header`);
inputHeader?.scrollIntoView({ behavior: "smooth" });
}
// scroll to the active step card
const stepCard = stepsDiv.value?.querySelector(`[data-index="${props.activeNodeId}"]`);
stepCard?.scrollIntoView();
const portletHeaderDiv = stepCard?.querySelector(".portlet-header");
stepsDiv.value?.scrollTo({ top: portletHeaderDiv?.getBoundingClientRect().top });
}
}
// clear any job being shown
Expand All @@ -88,7 +83,7 @@ function showJob(jobId: string | undefined) {
<!-- Input Steps grouped in a separate portlet -->
<div v-if="workflowInputSteps.length > 1" class="ui-portlet-section w-100">
<div
class="portlet-header portlet-operations invocation-inputs-header"
class="portlet-header portlet-operations"
role="button"
tabindex="0"
@keyup.enter="expandInvocationInputs = !expandInvocationInputs"
Expand Down

0 comments on commit 942a94c

Please sign in to comment.