diff --git a/source/nodejs/adaptivecards-designer/src/card-designer.ts b/source/nodejs/adaptivecards-designer/src/card-designer.ts index 8adab5df99..a78d7303d6 100644 --- a/source/nodejs/adaptivecards-designer/src/card-designer.ts +++ b/source/nodejs/adaptivecards-designer/src/card-designer.ts @@ -970,10 +970,10 @@ export class CardDesigner extends Designer.DesignContext { new Clipboard( this._copyJSONButton.renderedElement, { - text: (trigger) => { - return JSON.stringify(this.getBoundCard(), null, 4); - } - }); + text: (trigger) => JSON.stringify(this.getBoundCard(), null, 4) + }) + .on("error", () => this._copyJSONButton.renderedElement.focus()) + .on("success", () => this._copyJSONButton.renderedElement.focus()); } // Tool palette panel