Skip to content

Fix usage of "any" in a LiveChat component #39128

@Pratheek555

Description

@Pratheek555

Description:

Menu in livechat currently declares ref?: any and PopoverMenuWrapper relies on a legacy component-instance shape (Component & { base: Element }). This bypasses strict typing and can hide ref mismatches between Menu and its consumers.

Expected behavior:

  • Menu should type ref from the actual rendered element contract (HTMLDivElement) instead of any.
  • PopoverMenuWrapper should store/use a DOM ref (HTMLDivElement | null) and call getBoundingClientRect() directly without .base.

Actual behavior:

  • MenuProps uses ref?: any.
  • PopoverMenuWrapper uses menuRef?.base?.getBoundingClientRect(), coupling to a legacy component ref shape and weakening type safety.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featurePull requests that introduces new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions