fix iframe window move problem

This commit is contained in:
lxsang
2021-04-01 19:19:45 +02:00
parent d670bd3b3a
commit 77f643a206
4 changed files with 9 additions and 1 deletions

View File

@ -361,6 +361,7 @@ namespace OS {
offset.top = e.clientY - offset.top;
offset.left = e.clientX - offset.left;
$(window).on("mousemove", (e) => {
$(this.refs.win_overlay).show();
let left: number, top: number;
if (this._isMaxi) {
this.toggle_window();
@ -385,7 +386,8 @@ namespace OS {
.css("top", `${top}px`)
.css("left", `${left}px`);
});
return $(window).on("mouseup", function (e) {
return $(window).on("mouseup", (e) => {
$(this.refs.win_overlay).hide();
$(window).off("mousemove", null);
return $(window).off("mouseup", null);
});