Skip to content

Treeview Examples: Hovering to right of tree causes blinking #712

@mcking65

Description

@mcking65

Per feedback from @sh0ji in issue 225:

The hover class is being added and removed very rapidly when hovering over the [role=treeitem]'s section that is outside the width specified in the corresponding CSS selector. The result for the user is white/gray flashing that exceeds 3 flashes per second.

This appears to be because the corresponding span (firstElementChild of the tree item) is full-width on mouseover, and then CSS immediately sets it to 16em, triggering the mouseout event.

[role="treeitem"].hover,
[role="treeitem"] span.hover {
  background-color: #DDDDDD;
  /* this causes the hover class to be removed if the cursor is outside the 16em */
  width: 16em;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Example PageRelated to a page containing an example implementation of a patternbugCode defects; not for inaccurate prose

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions