Skip to content
Snippets Groups Projects
Unverified Commit 88859cf6 authored by tamaina's avatar tamaina Committed by GitHub
Browse files

fix(client): Handle null of rootEl in MkWindow.vue (#9326)


* fix(client): Handle null of rootEl in MkWindow.vue

* comment

Co-authored-by: default avatarsyuilo <Syuilotan@yahoo.co.jp>
parent 867e31c9
No related branches found
Tags 12.70.0
No related merge requests found
......@@ -221,6 +221,8 @@ function onHeaderMousedown(evt: MouseEvent) {
// 上ハンドル掴み時
function onTopHandleMousedown(evt) {
const main = rootEl;
// どういうわけかnullになることがある
if (main == null) return;
const base = evt.clientY;
const height = parseInt(getComputedStyle(main, '').height, 10);
......@@ -247,6 +249,7 @@ function onTopHandleMousedown(evt) {
// 右ハンドル掴み時
function onRightHandleMousedown(evt) {
const main = rootEl;
if (main == null) return;
const base = evt.clientX;
const width = parseInt(getComputedStyle(main, '').width, 10);
......@@ -271,6 +274,7 @@ function onRightHandleMousedown(evt) {
// 下ハンドル掴み時
function onBottomHandleMousedown(evt) {
const main = rootEl;
if (main == null) return;
const base = evt.clientY;
const height = parseInt(getComputedStyle(main, '').height, 10);
......@@ -295,6 +299,7 @@ function onBottomHandleMousedown(evt) {
// 左ハンドル掴み時
function onLeftHandleMousedown(evt) {
const main = rootEl;
if (main == null) return;
const base = evt.clientX;
const width = parseInt(getComputedStyle(main, '').width, 10);
......@@ -366,6 +371,8 @@ function applyTransformLeft(left) {
function onBrowserResize() {
const main = rootEl;
if (main == null) return;
const position = main.getBoundingClientRect();
const browserWidth = window.innerWidth;
const browserHeight = window.innerHeight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment