FIX: Use localStorage for all iOS browsers

FIX: Use localStorage for all iOS browsers

Since under the hood, they are all Safari.

diff --git a/assets/javascripts/lib/keys_db.js.es6 b/assets/javascripts/lib/keys_db.js.es6
index 7bcb9d2..70c2ffe 100644
--- a/assets/javascripts/lib/keys_db.js.es6
+++ b/assets/javascripts/lib/keys_db.js.es6
@@ -18,7 +18,7 @@ export const DB_NAME = "discourse-encrypt";
  */
 export const isSafari =
   !!navigator.userAgent.match(/Version\/(\d+).+?Safari/) ||
-  !!navigator.userAgent.match(/Discourse\/.*Darwin/);
+  !!navigator.userAgent.match(/(iPad|iPhone|iPod)/);
 
 /**
  * Exports a public key.

GitHub sha: 1538d531

2 Likes