Skip to content

Commit 8ae6b25

Browse files
committed
open popup in maxWidth/Height available
1 parent 3191fc2 commit 8ae6b25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/pods/components/intermediate-contest-view/component.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,6 @@ export default class IntermediateContestComponent extends Component {
118118
}
119119

120120
@action async openTestInNewWindow() {
121-
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', 'popup')
121+
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', `menubar=1,resizable=0,height=${window.screen.availHeight},width=${window.screen.availWidth}`)
122122
}
123123
}

app/pods/contests/contest/index/controller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ export default class IndexController extends Controller {
6262
}
6363
@action
6464
onAfterCreate() {
65-
window.open(`${ENV.publicUrl}/contests/${this.contest.id}/attempt/`, '_blank', 'popup')
65+
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}`)
6666
}
6767
}

0 commit comments

Comments
 (0)