Skip to content

Commit

Permalink
Custom activity editor now properly sends leftover content (#2255)
Browse files Browse the repository at this point in the history
* Custom activity editor now properly sends leftover content

* Added changelog entry
  • Loading branch information
tonyanziano authored Apr 12, 2021
1 parent 8023cbe commit c520cc6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Fixed
- [client] Added circular JSON handling to `forwardToMain.ts` which fixed a bug preventing the Emulator from connecting to Direct Line Speech bots in PR [2242](https://github.com/microsoft/BotFramework-Emulator/pull/2242)
- [client/main] Fixed an issue where the Emulator was failing to detect the final redirect URL when trying to login to Azure in PR [2248](https://github.com/microsoft/BotFramework-Emulator/pull/2248)
- [client] Fixed an issue where the Custom Activity Editor was sending the default model content instead of what was currently being displayed in the editor in PR [2255](https://github.com/microsoft/BotFramework-Emulator/pull/2255)

## v4.12.0 - 2021 - 3 - 05
## Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ export const CustomActivityEditor: React.FC<CustomActivityEditorProps> = (props:
// warnings are 4 and errors are 8
setIsValid(!markers.some(m => m.severity >= monaco.MarkerSeverity.Warning));
});
// the editor's model may still have leftover content from the last time it was rendered;
// send it back through the onDidChangeModelContent handler so that it gets set in the React state
editor.setValue(editor.getValue());
}, []);

const onSendActivityClick = useCallback(() => {
Expand Down

0 comments on commit c520cc6

Please sign in to comment.