Index: openacs-4/packages/proctoring-support/lib/proctoring-display.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/proctoring-support/lib/proctoring-display.adp,v diff -u -r1.1.2.10 -r1.1.2.11 --- openacs-4/packages/proctoring-support/lib/proctoring-display.adp 18 Feb 2022 13:25:15 -0000 1.1.2.10 +++ openacs-4/packages/proctoring-support/lib/proctoring-display.adp 18 Feb 2022 13:30:42 -0000 1.1.2.11 @@ -140,9 +140,11 @@ var form = this; request.addEventListener("loadend", function () { if (this.status === 200) { - updateArtifactComments(modalIdElement.value, this.response); + var artifactId = modalIdElement.value; + updateArtifactComments(artifactId, this.response); form.reset(); closeModal(); + document.querySelector(".comment[data-artifact-id='" + artifactId + "']")?.focus(); } else { alert(this.response); } @@ -158,6 +160,7 @@ var artifactId = this.getAttribute('data-artifact-id'); modalIdElement.value = artifactId; modal.style.display = "block"; + modal.querySelector("#comment").focus(); }; // When the user clicks on (x), close the modal