Skip to content

Commit

Permalink
Перенос обработчика mousemove и mouseup на this.container
Browse files Browse the repository at this point in the history
  • Loading branch information
SashaXser committed Jun 18, 2024
1 parent 7edc95c commit 29d474a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/vot-cloudflare-min.user.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/vot-cloudflare.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5486,11 +5486,11 @@ class VideoHandler {
this.dragging = true;
});

document.addEventListener("mouseup", () => {
this.container.addEventListener("mouseup", () => {
this.dragging = false;
});

document.addEventListener("mousemove", async (e) => {
this.container.addEventListener("mousemove", async (e) => {
if (this.dragging) {
e.preventDefault();

Expand Down
2 changes: 1 addition & 1 deletion dist/vot-min.user.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/vot.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -5376,11 +5376,11 @@ class VideoHandler {
this.dragging = true;
});

document.addEventListener("mouseup", () => {
this.container.addEventListener("mouseup", () => {
this.dragging = false;
});

document.addEventListener("mousemove", async (e) => {
this.container.addEventListener("mousemove", async (e) => {
if (this.dragging) {
e.preventDefault();

Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -904,11 +904,11 @@ class VideoHandler {
this.dragging = true;
});

document.addEventListener("mouseup", () => {
this.container.addEventListener("mouseup", () => {
this.dragging = false;
});

document.addEventListener("mousemove", async (e) => {
this.container.addEventListener("mousemove", async (e) => {
if (this.dragging) {
e.preventDefault();

Expand Down

0 comments on commit 29d474a

Please sign in to comment.