Skip to content

respec pill (error) #5355

Description

@zoot-inge

Description of problem

Clicking on the error pill does not show a list. This goes wrong when the error is a string.

When the error is a string then firstElementChild and lastElementChild are both null, firstChild and lastChild contain text.
The part in ui.js that wants to show the list expects html (from objects) and should have an additional check.

  if (fragment.firstElementChild === fragment.lastElementChild) {

    li.append(
      .../** @type {Element} */ (fragment.firstElementChild).childNodes
    );

An alternative approach could be to get rid of string errors/warnings.

URL to affected spec or repo: https://geonovum.github.io/dso-cim-ow/

What happened (e.g., it crashed)?: Code crashes (developer console)

Expected behavior (e.g., it shouldn't crash): When clicking on the pill it should show a list (even for string messages).

Optional, steps to reproduce:

  1. leave out the mandatory sotd section (SotD paragraph).
  2. open the document and click on the red pill
  3. no list is shown

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions