Skip to content

Column widths are incorrect after rows created using appendChild method of table body #584

Description

@gjsjohnmurray

I have a webview containing a 2-column table whose column widths are defined as ["auto", "10%"]. The table itself is in a collapsible (though this might not be significant) and an action button on the collapsible causes a refresh of the table. The refresh script sets innerHTML of the body element to '', then uses its appendChild method to add the rows. The table headers display correctly (90% of the width for the first header, 10% for the second) but the data rows use 50% for each until I click on the splitter between first and second headers. At that point the widths of the row cells get corrected.

As a workaround I added this to the populating script after all appendChild calls:

 tblFiles.columns = tblFiles.columns;

With this addition, the first time I populate the table with rows their cell widths are correct, but on subsequent refreshes they remain 50% and 50% until I click the header splitter.

I am using 3.4.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions