Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JS][ShowCards] Show card inputs are cleared if closed and reopened #3617

Closed
RebeccaAnne opened this issue Nov 15, 2019 · 4 comments · Fixed by #3621
Closed

[JS][ShowCards] Show card inputs are cleared if closed and reopened #3617

RebeccaAnne opened this issue Nov 15, 2019 · 4 comments · Fixed by #3621
Assignees
Labels
Bug Platform-JavaScript Bugs or features related to the JavaScript renderer

Comments

@RebeccaAnne
Copy link
Contributor

Platform

What platform is your issue or question related to? (Delete other platforms).

  • JavaScript

Details

If you show a show card, enter an input in that show card, and then close and re-open the show card, the inputted value is cleared:

  1. In the below card, click the "Click here to personalize your item" ShowCard button.
  2. Type something into the input
  3. Close the show card and reopen it

Result: Typed input has been lost.

{
	"type": "AdaptiveCard",
	"version": "1.0",
	"body": [
		{
			"type": "TextBlock",
			"text": "Which color would you like?"
		},
		{
			"type": "Input.ChoiceSet",
			"placeholder": "Placeholder text",
			"choices": [
				{
					"title": "Red",
					"value": "Red"
				},
				{
					"title": "Blue",
					"value": "Blue"
				}
			],
			"style": "expanded",
			"id": "color"
		},
		{
			"type": "ActionSet",
			"actions": [
				{
					"type": "Action.ShowCard",
					"title": "Click here to personalize your item",
					"card": {
						"type": "AdaptiveCard",
						"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
						"body": [
							{
								"type": "TextBlock",
								"text": "Name (20 characters max):"
							},
							{
								"type": "Input.Text",
								"placeholder": "Name",
								"id": "personalizationName"
							}
						]
					}
				}
			]
		},
		{
			"type": "TextBlock",
			"text": "Choose your shipping type:" 
		},
		{
			"type": "Input.ChoiceSet",
			"placeholder": "Placeholder text",
			"choices": [
				{
					"title": "Standard (5-7 business days)",
					"value": "Standard"
				},
				{
					"title": "Express (2-3 business days)",
					"value": "Express"
				},
				{
					"title": "Overnight (next business day)",
					"value": "Overnight"
				}
			],
			"style": "expanded",
			"id": "shipping"
		}
	],
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"actions": [
		{
			"type": "Action.Submit",
			"title": "Submit Order"
		}
	]
}
@shalinijoshi19
Copy link
Member

Assigning to @dclaux for a first look; @RebeccaAnne what's the behavior on other platforms for reference again? Thanks

@RebeccaAnne
Copy link
Contributor Author

@shalinijoshi19 Confirmed that at least UWP and .NET don't lose the user's input in this scenario.

@shalinijoshi19
Copy link
Member

@dclaux is this a regression or patch-worthy fix? In other words does this need to be CP'd over to release/1.2?

@dclaux
Copy link
Member

dclaux commented Nov 19, 2019

I'm fairly certain it's been that way forever in JS. So not a regression. Still, I think it's pretty bad.

@shalinijoshi19 shalinijoshi19 added the Platform-JavaScript Bugs or features related to the JavaScript renderer label Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Platform-JavaScript Bugs or features related to the JavaScript renderer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants