Skip to content

"disable adaptive cards" - sample does not work in Version 4.19.1 of botframework-webchat #5847

@MGwiozda

Description

@MGwiozda

Is it an issue related to Adaptive Cards?

Yes, this is an Adaptive Card issue, however it only repro on Web Chat.

Is this an accessibility issue?

No

What version of Web Chat are you using?

Latest production

Which distribution are you using Web Chat from?

NPM

Which hosting environment does this issue primarily affect?

Web apps

Which browsers and platforms do the issue happened?

Browser: Chrome (latest)

Which area does this issue affect?

Attachment: Adaptive Card

Which theme pack does this issue affect?

I did not test it on other theme packs

What is the public URL for the website?

No response

Please describe the bug

The disabling of adaptive cards worked in Version 4.17.0. In Version 4.19.1 it's broken.

Aufzeichnung.2026-06-19.090559.mp4

Do you see any errors in console log?

No

How to reproduce the issue?

  1. Use the adaptive-cards sample: https://github.com/microsoft/BotFramework-WebChat/blob/main/samples/05.custom-components/l.disable-adaptive-cards/index.html
  2. use an chatbot with a adaptive cards dialog which sends subsequent adaptive cards
  3. send an adaptive card

What do you expect?

the before last adaptive card gets disabled

What actually happened?

the before last adaptive card doesn't get disabled

Context

It looks like the attachmentMiddleware is now called only once: when the adaptive card is initially rendered. In Version 4.17.0 the middleware was called for every new message in the bot. This behaviour change is probably the cause for the broken feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.bugIndicates an unexpected problem or an unintended behavior.customer-reportedRequired for internal Azure reporting. Do not delete.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions