-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
wc-shellinput value does not change after programatically injecting new value #680
Comments
This is a React app, so it maintains DOM state internally and updates from there. Manipulating the DOM directly will have unexpected results. Don't do that. |
Agree this is not a bug. But, it could be a feature request. @ramgesg can you provide a scenario where you would inject text on the user's behalf? |
@dan, this is for injecting onselect value from autosuggest.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Dan Marshall<mailto:[email protected]>
Sent: Friday, September 8, 2017 11:23 PM
To: Microsoft/BotFramework-WebChat<mailto:[email protected]>
Cc: Ramakrishnan S<mailto:[email protected]>; Mention<mailto:[email protected]>
Subject: Re: [Microsoft/BotFramework-WebChat] wc-shellinput value does not change after programatically injecting new value (#680)
Agree this is not a bug. But, it could be a feature request. @ramgesg<https://github.com/ramgesg> can you provide a scenario where you would inject text on the user's behalf?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#680 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AZKM-4CKk51hW7WvGp0u4ogJRg_0wbSaks5sgX8WgaJpZM4PQhNT>.
|
Related to #476 |
We can continue this conversation in #476 |
Not a clean method but you can use this. //Fill the input field : Using a Hack. This might break after the next React update $(".wc-send:first").click(); |
@mrPrateek95 Thank you for this. But, it works in chrome and firefox and not in IE. Any idea on this? |
@Snekha-Shivakumar What version of IE are you using? I have tested it on IE11. Seems to be working there. |
@mrPrateek95 Yeah I found the issue. new CustomEvent() is not working in IE. Just added a polyfill before the custom event and it works fine now. Here is the polyfill:
Thank you. |
@Snekha-Shivakumar Checked on my client. I have also added this polyfill. Slipped my mind earlier. |
Hey @mrPrateek95,
|
$(".wc-shellinput").prop({value: "Welcome"})
changes the display value of the text box but does not make changes in value of input class...<input class="wc-shellinput" type="text" placeholder="Type your message..." value="" autocomplete="off">
The text was updated successfully, but these errors were encountered: