Skip to content

Commit c1956f9

Browse files
authored
Merge pull request #1 from Imat00/codingchallange/ISSUEtim/develop
fixed scrollIntoView behavior
2 parents fa6cf92 + 6ece1f1 commit c1956f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

roles/ui/files/FWO.UI/wwwroot/js/scrollIntoView.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ function scrollIntoRSBView(htmlObjId) {
66
obj.scrollIntoView({ behavior: "smooth", block: "center" });
77
// Expand row
88
let toggleLink = obj.previousElementSibling.querySelector("a");
9-
if (toggleLink) {
9+
let ariaEpended = toggleLink.getAttribute("aria-expanded");
10+
if (ariaEpended == 'false')
11+
{
1012
toggleLink.click();
11-
}
13+
}
1214
// Highlight the row
1315
obj.style.transition = "background-color 500ms linear";
1416
obj.style.backgroundColor = "#a4d7f5";

0 commit comments

Comments
 (0)