Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Logic for selecting fact from nested tags doesn't work with continuations #437

Open
paulwarren-wk opened this issue May 31, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@paulwarren-wk
Copy link
Contributor

paulwarren-wk commented May 31, 2023

What happened?

When you click on nested text block facts in certain reports, the outermost fact is selected rather than the innermost fact.

For example, open this filing, scroll to page 189, and click on the "Defined benefit plan" text. You now have two facts shown in the fact inspector, but it is the outer "Disclosure of notes and other explanatory information" tag that is selected by default, not the innermost one:

image

We have some complex logic here:

  • For nested tags we generally want to select the innermost tag.
  • For "double tags" (i.e. nested tags with exactly the same content) we want to select the outermost tag, as it's more intuitive that the "next tag" button takes you to the second double tag.

This filing uses ix:continuation elements, and the contents of the ix:continuation elements are the same for both the inner and outer tags, so we mistakenly treat this as a double tag rather than a nested tag.

We are also scrolling the view even though the tag is already in view. I don't think that we should ever scroll when selecting a fact by clicking on it.

Version

1.1.61 (ish)

With which browsers are you experiencing the bug?

Chrome

Documents

No response

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant