summaryrefslogtreecommitdiff
path: root/app/error-handler.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/error-handler.js')
-rw-r--r--app/error-handler.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/error-handler.js b/app/error-handler.js
index 675bc51..67b6372 100644
--- a/app/error-handler.js
+++ b/app/error-handler.js
@@ -51,6 +51,12 @@ function handleError(event, err) {
document.getElementById('noVNC_fallback_error')
.classList.add("noVNC_open");
+ } catch (exc) {
+ document.write("noVNC encountered an error.");
+ }
+
+ // Try to disable keyboard interaction, best effort
+ try {
// Remove focus from the currently focused element in order to
// prevent keyboard interaction from continuing
if (document.activeElement) { document.activeElement.blur(); }
@@ -61,8 +67,9 @@ function handleError(event, err) {
elem.setAttribute("tabindex", "-1");
});
} catch (exc) {
- document.write("noVNC encountered an error.");
+ // Do nothing
}
+
// Don't return true since this would prevent the error
// from being printed to the browser console.
return false;