From df0b6f7b7161c8850ed37241c71c70d6a8f7352d Mon Sep 17 00:00:00 2001 From: kib <104761667+kibibytium@users.noreply.github.com> Date: Thu, 4 Dec 2025 16:31:57 +0100 Subject: [PATCH] check browser support for regex look behind this commit drops support for iOS 16.2 due to an issue with regex support Co-authored-by: sug --- src/common/misc/ClientDetector.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/common/misc/ClientDetector.ts b/src/common/misc/ClientDetector.ts index ee3350cd64..783c0914cb 100644 --- a/src/common/misc/ClientDetector.ts +++ b/src/common/misc/ClientDetector.ts @@ -134,7 +134,7 @@ export class ClientDetector { */ isSupported(): boolean { this.syntaxChecks() - return this.isSupportedBrowserVersion() && this.testBuiltins() && this.websockets() && this.testCss() + return this.isSupportedBrowserVersion() && this.testBuiltins() && this.websockets() && this.testCss() && this.lookBehindRegex() } isMobileDevice(): boolean { @@ -184,6 +184,15 @@ export class ClientDetector { return "XMLHttpRequest" in window } + lookBehindRegex(): boolean { + try { + ;/(?<=([ab]+)([bc]+))$/.exec("abc") + return true + } catch (e) { + return false + } + } + indexedDb(): boolean { try { return window.indexedDB != null