ixbrl-viewer icon indicating copy to clipboard operation
ixbrl-viewer copied to clipboard

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

Open paulwarren-wk opened this issue 1 year ago • 0 comments

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

paulwarren-wk avatar May 31 '23 14:05 paulwarren-wk