Commit e8b5024 for novnc.com

commit e8b5024d4603587b29ffede4fbd28b1fa2939829
Author: Samuel Mannehed <samuel@cendio.se>
Date:   Fri Oct 23 14:19:48 2026 +0200

    Ignore errors without a location in error-handler

    This was added to hide a "script error" bug in Firefox iOS by preventing
    our error handler from showing a message. But note that it hides any
    errors matching the message and lacking a filename.

    There is no easy way to detect Firefox on iOS since it's user agent
    fully matches Safari on MacOS.

diff --git a/app/error-handler.js b/app/error-handler.js
index ef1cb64..b8dbbcb 100644
--- a/app/error-handler.js
+++ b/app/error-handler.js
@@ -17,6 +17,14 @@ function handleError(event, err) {
             return false;
         }

+        // Errors without a location can't come from our own same-origin
+        // scripts, so ignore them. Firefox for iOS triggers this from its
+        // injected password manager script when non-input elements get focus:
+        // https://github.com/mozilla-mobile/firefox-ios/issues/36259
+        if ((event.message === "Script error.") && !event.filename) {
+            return false;
+        }
+
         // Only show the initial error
         if (msg.hasChildNodes()) {
             return false;