From 6263a4539576ce92f97a02b9e7bde2804e01a6df Mon Sep 17 00:00:00 2001 From: Melissa Zhang Date: Sat, 8 Aug 2020 15:28:55 -0700 Subject: clean up code, fix delete link bugs --- src/client/views/MainView.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/views/MainView.tsx') 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); -- cgit v1.2.3-70-g09d2