question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Since 4.5, Adaptive Card Inputs won't focus

See original GitHub issue

Version

4.5.0

Describe the bug

Unable to use most Adaptive Card input fields. It seems to lose focus as soon as I click in the input field and text immediately disappears. See gif.

9009d58f-566e-4ca0-a0fe-90860260d3eb

To Reproduce

Try this:

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "text": "Test Adaptive Card"
        },
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Text:"
                        }
                    ],
                    "width": 20
                },
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "Input.Text",
                            "id": "userText",
                            "placeholder": "Enter Some Text"
                        }
                    ],
                    "width": 80
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}
import * as cardJson from './adaptiveCard.json';

this.addDialog(new TextPrompt('textPrompt'));

const card = CardFactory.adaptiveCard(cardJson);
const msg = MessageFactory.text('');
msg.attachments = [card];
await step.context.sendActivity(msg);
return await step.prompt('textPrompt', 'test');

Expected behavior

Able to use Adaptive Card inputs.

Additional context

@tdurnford says WebChat seems to work fine, still.

[bug]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tonyanzianocommented, Jul 17, 2019

This issue has been fixed in the newest release, 4.5.2, available now.

1reaction
tonyanzianocommented, Jul 16, 2019

I can repro this, and it’s because the example you are using is a <textarea> tag and not an <input> tag which is what #1681 fixed.

Today I will work on a fix for all the different inputs within adaptive cards, and I think we will push out a patch as well. I’ll keep this thread updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Input.Text - Schema Explorer | Adaptive Cards
Used to identify collected input when the Submit action is performed. 1.0. isMultiline, boolean, No, If true , allow multiple lines of input....
Read more >
Adaptive Card clears input on submit - Stack Overflow
If you send a card to the user and the input fields' value properties are populated, the fields won't be empty.
Read more >
PLHS 2022 Community Health Needs Assessment - Prairie Lakes ...
A CHNA is a tool used to help communities assess their strengths as well as their weaknesses when it comes to the health...
Read more >
Swiper API
After you initialize Swiper it is possible to access to Swiper's instance on its HTMLElement. ... Such parameters like loop and effect won't...
Read more >
FORD MUSTANG MACH-E Owner's Manual
Locating the Keyless Entry Keypad ........74 ... Restarting the Vehicle After Powering ... Setting the Adaptive Cruise Control Gap.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found