diff --git a/resources/report/js/script.js b/resources/report/js/script.js
index 1a1e8672..79646053 100644
--- a/resources/report/js/script.js
+++ b/resources/report/js/script.js
@@ -953,12 +953,11 @@ function showAboutDialog(evt) {
document.getElementById('about').showModal();
}
function closeSettingsDialog(evt) {
- if (!areSettingsValid()) {
- return;
- }
-
- var dialog = evt.target.parentElement;
if (evt.target.classList.contains('accept')) {
+ if (!areSettingsValid()) {
+ return;
+ }
+
/* Update the JS variable values. */
var settings = {
enableDebugLogging: document.getElementById('enableDebugLogging').checked,
@@ -1001,6 +1000,7 @@ function closeSettingsDialog(evt) {
/* Re-apply the existing settings to the settings dialog elements. */
loot.updateSettingsUI();
}
+ evt.target.parentElement.close();
}
function showSettingsDialog(evt) {
diff --git a/resources/report/report.html b/resources/report/report.html
index 4cf1c132..da416d11 100644
--- a/resources/report/report.html
+++ b/resources/report/report.html
@@ -182,7 +182,7 @@ along with LOOT. If not, see <http://www.gnu.org/licenses/>.
OK
-
+