-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Sending questions with trailing spaces using enter fails to trim(). - fix included #2328
Comments
@jimmyjames177414 Can you test with the latest CDN? Master uses Web Chat v4.3.1 and is no longer updated. https://cdn.botframework.com/botframework-webchat/latest/webchat.js |
@tdurnford I just tested both CDN's you suggested and both have the issue. Adding .trim() to the return of sendBoxValue (e.sendBoxValue) still fixes the issue as well. |
@jimmyjames177414 Thanks for reporting this issue! If you are able, it would be amazing if you could file an issue with the fix in our repository, and we will prioritize verifying your changes to merge in. This fix will likely be available in our next release in late October. If you need these changes immediately (once the fix is in), please see our documentation on pointing to our MyGet feed for latest bits. |
Bug fix for "Sending questions with trailing spaces using enter fails to trim(). - fix included microsoft#2328" microsoft#2328
Would it be better to fix this in function* submitSendBox() {
yield takeEvery(SUBMIT_SEND_BOX, function*({ payload: { method } }) {
const sendBoxValue = yield select(sendBoxValueSelector);
if (sendBoxValue) {
yield put(sendMessage(sendBoxValue.trim(), method));
yield put(setSendBox(''));
}
});
} |
Sounds good! |
If we are trimming the |
Screenshots
Network call sending trailing spaces:
webchat.js needs .trim() added to the following:
webchat-es5.js needs .trim() added to the following:
Version
This issue can be found on the following CDN's as of 8/16/2019:
https://cdn.botframework.com/botframework-webchat/master/webchat.js
https://cdn.botframework.com/botframework-webchat/master/webchat-es5.js
https://cdn.botframework.com/botframework-webchat/latest/webchat.js
https://cdn.botframework.com/botframework-webchat/latest/webchat-es5.js
Describe the bug
When sending text with trailing spaces, such as "what is AI ", and then clicking enter to submit, the trailing spaces are not stripped and the network call sends the trailing white spaces as shown above.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
When submitting a question using the enter key, the question should be stripped of trailing white spaces (the same way the click to submit works).
Additional context
I have attached the two scripts with the fix:
space fix.zip
As a special request, could you send a text to (219) 310- 5041 when this bug is fixed? This is a high priority fix for our product.
[Bug]
The text was updated successfully, but these errors were encountered: