Skip to content

Project Designer throws a JavaScript error on load (getStyle('td_sample')) #431

Closed

Description

@caseysoftware

Found on the dev-6.0.0 branch (local, at 9bd3a1e0) during the lib/ cleanup. It may be on master too: the same code is there.

modules/projectdesigner/index.php L591 runs getStyle('td_sample', 'background-color', 'backgroundColor') on page load. No element with id td_sample exists any more, so getComputedStyle(null) throws "Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'". original_bgc stays undefined for the row-highlight code that uses it.

Fix: remove the call (and original_bgc) if row highlighting no longer needs it, or guard getStyle() (modules/projectdesigner/index.js L123) against a missing element and fall back to a fixed colour.

Activity

  1. added a commit that references this issue on Oct 21, 2026
    21e646a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions