Skip to content

[Rendering][JS] onAnchorClicked() should pass the anchor element itself not the target #6810

@robin-liao

Description

@robin-liao

Target Platforms

NodeJS

SDK Version

2.7.0

Application Name

Microsoft Teams

Problem Description

Considering this markdown

[**hyperlink strong**](https://microsoft.com)

will generate

<a href=""https://microsoft.com"><strong>hyperlink strong</strong></a>

Currently onAnchorClicked?: (element: CardElement, anchor: HTMLAnchorElement) => boolean; will pass <strong> element as the anchor, which contains no hyperlink (href) on it. It's supposed to pass <a> as the anchor, which means pass anchor itself at here rather than e.target

Screenshots

No response

Card JSON

{
  "$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.0",
  "body": [
    {
      "type": "TextBlock",
      "text": "[**hyperlink strong**](https://microsoft.com)"
    }
  ]
}

Sample Code Language

No response

Sample Code

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions