Skip to content

Commit ee44a84

Browse files
committed
fix: Prevent loader stealing card iframe focus
1 parent b351147 commit ee44a84

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

javascript/tokenscript-viewer/src/integration/abstractViewBinding.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export abstract class AbstractViewBinding implements IViewBinding {
8383

8484
protected hideLoader() {
8585
this.loader.style.display = "none";
86+
// Return focus to iframe
87+
if (this.iframe)
88+
this.iframe.contentWindow.focus();
8689
}
8790

8891
static async injectContentView(iframe: HTMLIFrameElement, card: Card, viewController: ViewController) {

0 commit comments

Comments
 (0)