Arelle / ixbrl-viewer

The Arelle iXBRL Viewer allows Inline XBRL (or iXBRL) reports to be viewed interactively in a web browser. The viewer allows users to access the tagged XBRL data embedded in an iXBRL report.
Other
93 stars 57 forks source link

Avoid interfering with layout of tables with absolutely positioned content #641

Open paulwarren-wk opened 6 months ago

paulwarren-wk commented 6 months ago

Fixes #632

Reason for change

The viewer currently interferes with the layout of tables that contain absolutely positioned content. The problematic situation is this:

    <div class="page" style="position: absolute">
        <table>
            <tr>
                <td>
                    <div style="position: absolute">1,000</div>
                </td>
            </tr>
        </table>
    </div>

The viewer then adds position: relative to the <table> tag, which means that the absolutely position <div> is now positioned with respect to the wrong parent.

The viewer adds this class, because it is used to place the table export icon in the top left of the table.

Description of change

The viewer no longer adds an export handle if absolutely positioned content is found within the table.

It would obviously better to enable the export functionality, as the presence of the table tags means that the export should work (where previously it didn't on most ESEF filings), but it's not at all trivial, as the <table> tag is likely to be rendered is some random location.

Steps to Test

Check that the layout of the sample document on #632 is now correct when loaded in the viewer.

review: @Arelle/arelle @paulwarren-wk

aviary-wf commented 6 months ago

Security Insights

No security relevant content was detected by automated scans.

Action Items