Skip to content

Commit c05dca8

Browse files
authored
[JS] Fix microsoft#6810: onAnchorClicked() should pass the anchor element itself (microsoft#6837)
1 parent 7a46444 commit c05dca8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/nodejs/adaptivecards/src/card-elements.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,13 +1205,13 @@ export class TextBlock extends BaseTextBlock {
12051205
anchor.classList.add(hostConfig.makeCssClassName("ac-anchor"));
12061206
anchor.target = "_blank";
12071207
anchor.onclick = (e: MouseEvent) => {
1208-
if (raiseAnchorClickedEvent(this, e.target as HTMLAnchorElement, e)) {
1208+
if (raiseAnchorClickedEvent(this, anchor, e)) {
12091209
e.preventDefault();
12101210
e.cancelBubble = true;
12111211
}
12121212
};
12131213
anchor.oncontextmenu = (e: MouseEvent) => {
1214-
if (raiseAnchorClickedEvent(this, e.target as HTMLAnchorElement, e)) {
1214+
if (raiseAnchorClickedEvent(this, anchor, e)) {
12151215
e.preventDefault();
12161216
e.cancelBubble = true;
12171217

0 commit comments

Comments
 (0)