BotFramework-Composer
BotFramework-Composer copied to clipboard
duplicate completions in LG editors
Describe the bug
Swapping between tabs in the form editor can cause multiple copies of completions to stack up.
Browser
Edge 80.0
OS
Windows 10
To Reproduce
Steps to reproduce the behavior:
- Go to the Bot Composer, and open a bot.
- Move to or create an "Ask a Question" box (of any type other than OAuth Login).
- Start typing "- if" in the Bot Asks box, and notice that it brings up autocomplete suggestions.
- Move to the "Other" tab in the form editor, then back to "Bot Asks".
- Start typing "- if" in the box again, and notice that there are now 5 copies of the same one. Moving to Other adds 3 (one for each of the LGEditor boxes there), and then moving back to Bot Asks adds one more.
- Note that continuing to switch tabs stacks more and more copies up.
Expected behavior
There should only be one instance of every possible completion no matter how many times we switch tabs.
Screenshots

@a-b-r-o-w-n found an easy fix for this, and I've verified that it works. I'll put up a PR for it.