Skip to content

Commit

Permalink
CSS pointer events
Browse files Browse the repository at this point in the history
  • Loading branch information
hujambo-dunia committed Nov 17, 2023
1 parent ea0fe80 commit 7e9d075
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions client/src/composables/fileDrop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ export function useFileDrop(
function isAnyModalOpen() {
return document.querySelectorAll(".modal.show").length > 0;
}
function disableMouse(option = true) {

Check failure on line 23 in client/src/composables/fileDrop.ts

View workflow job for this annotation

GitHub Actions / client-unit-test (18)

'option' is assigned a value but never used. Allowed unused vars must match /_.+/u
$('#qa_iframe').css('pointer-events', 'none');
return document.querySelectorAll("iframe").length > 0;
}

type State = "idle" | "blocked" | "fileDragging";
type StateMachine = {
Expand Down Expand Up @@ -65,6 +69,7 @@ export function useFileDrop(
switch (event.type) {
case "dragover":
event.preventDefault();
disableMouse();
idleTimer = setTimeout(() => (currentState.value = "idle"), idleTime);
break;
case "drop":
Expand Down

0 comments on commit 7e9d075

Please sign in to comment.