Closed nexushoratio closed 1 year ago
First thoughts.
When we navigate into the new section and highlight the current job entry, it triggers a change of some sort.
That gets caught by one of the two class's MutationObservers (this Jobs
view is a pain). The observer triggers resetScroll
which saves the newly selected job entry, resets everything and goes back to that job. Which... highlights the job entry triggering the MO again... endless loop.
It is interesting that it only happens on these new sections and not on any of the older ones. So likely more to it than that.
The new sections do not have a name recognized by _uniqueIdentifier()
, and it accidentally selects the first job entry. This results in the magic text the MO is looking for to be the name of that job entry. So when job entry navigation selects that element, that is what triggers the endless loop.
We can successfully scroll up from the bottom of the new style sections and things work as expected, until the first job entry is selected.
All other sections with job entries have an h2
element that is used to provide the uid. These new sections do not, so the function balls back to whole innerText
. But I don't think that is really the problem after all (though nearby).
It could be that the magic watch-text is also innerText
, but only the first line. And then the MO handler compares that against the first line of text of the element observed.
And, of course, the first line of the innerText for the section is the same as the first line of the innerText for the job entry.
Even more reason to take on #150 .
It looks like they changed how jobs are loaded. Instead of adding jobs into the More jobs for you section, they create new sections.
The section scroller seems to handle that fine. However, when trying to navigate jobs inside these new sections, LIT fails and locks up. FF warns about the script suddenly slowing the page down, so likely went into and endless loop.
Seems to only happen in the second card, the one without the More jobs for you header.