diff options
author | Melissa Zhang <mzhang19096@gmail.com> | 2020-08-08 15:28:55 -0700 |
---|---|---|
committer | Melissa Zhang <mzhang19096@gmail.com> | 2020-08-08 15:28:55 -0700 |
commit | 6263a4539576ce92f97a02b9e7bde2804e01a6df (patch) | |
tree | 8268a7ee74e80d5b28bdafb8cd00d9047c520122 /src/client/views/MainView.tsx | |
parent | 9886ed681ff18a33f7acab8f83b475ca9ea60bf7 (diff) |
clean up code, fix delete link bugs
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index 3cb4fbb17..8f9b9e0a0 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -880,14 +880,14 @@ export class MainView extends React.Component { var success = false; const onSuccess = () => { - console.log("EDIT SUCCESS"); success = true; clearTimeout(interval); document.removeEventListener("editSuccess", onSuccess); }; - const interval = setInterval(() => { // keep trying to click until annotations have loaded and editing is successful - console.log("clicked"); + // For some reason, Hypothes.is annotations don't load until a click is registered on the page, + // so we keep simulating clicks until annotations have loaded and editing is successful + const interval = setInterval(() => { !success && simulateMouseClick(ele, 50, 50, 50, 50); }, 500); |