From 6d0f6426a3dc4b1928562b4aacad24fa97fb4b34 Mon Sep 17 00:00:00 2001 From: Vibhu Dujari Date: Thu, 16 May 2024 14:46:34 +0530 Subject: [PATCH] position poptup in top-left --- app/pods/components/intermediate-contest-view/component.js | 2 +- app/pods/contests/contest/index/controller.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pods/components/intermediate-contest-view/component.js b/app/pods/components/intermediate-contest-view/component.js index 1233640..63c42fd 100644 --- a/app/pods/components/intermediate-contest-view/component.js +++ b/app/pods/components/intermediate-contest-view/component.js @@ -118,6 +118,6 @@ export default class IntermediateContestComponent extends Component { } @action async openTestInNewWindow() { - window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', `menubar=1,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth}`) + window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, `hackerblocks-contest-${this.contest.id}`, `menubar=1,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth},top=0,left=0`) } } diff --git a/app/pods/contests/contest/index/controller.js b/app/pods/contests/contest/index/controller.js index 83bf44f..ad2c20e 100644 --- a/app/pods/contests/contest/index/controller.js +++ b/app/pods/contests/contest/index/controller.js @@ -62,6 +62,6 @@ export default class IndexController extends Controller { } @action onAfterCreate() { - window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, `hackerblocks-contest-${this.contest.id}`, `menubar=0,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth}`) + window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, `hackerblocks-contest-${this.contest.id}`, `menubar=1,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth},top=0,left=0`) } }