Fix pop-out bug (#8170)

This commit is contained in:
Kainoa Kanter 2022-01-26 00:11:41 -08:00 committed by GitHub
parent 5a33789cd1
commit 25cac0089f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,8 @@
import * as config from '@/config';
export function popout(path: string, w?: HTMLElement) {
let url = path.startsWith('http://') || path.startsWith('https://') ? path : config.url + path;
url += '?zen'; // TODO: ちゃんとURLパースしてクエリ付ける
let url = path.startsWith('http://') || path.startsWith('https://') ? path : config.url + "/" + path;
url += '?zen';
if (w) {
const position = w.getBoundingClientRect();
const width = parseInt(getComputedStyle(w, '').width, 10);