File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -765,6 +765,12 @@ lib.isIOS = function() {
765
765
return IS_IOS_REGEX . test ( window . navigator . userAgent ) ;
766
766
} ;
767
767
768
+ // The WKWebView user agent string doesn't include 'Safari', so we need a separate test
769
+ // for a UA string like this:
770
+ // Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)
771
+ const IS_MAC_WKWEBVIEW_REGEX = / M a c i n t o s h .+ A p p l e W e b K i t .+ G e c k o \) $ / ;
772
+ lib . isMacWKWebView = ( ) => IS_MAC_WKWEBVIEW_REGEX . test ( window . navigator . userAgent ) ;
773
+
768
774
var FIREFOX_VERSION_REGEX = / F i r e f o x \/ ( \d + ) \. \d + / ;
769
775
lib . getFirefoxVersion = function ( ) {
770
776
var match = FIREFOX_VERSION_REGEX . exec ( window . navigator . userAgent ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ function supportsPixelatedImage() {
19
19
_supportsPixelated = false ;
20
20
21
21
// @see https://github.com/plotly/plotly.js/issues/6604
22
- var unsupportedBrowser = Lib . isSafari ( ) || Lib . isIOS ( ) ;
22
+ var unsupportedBrowser = Lib . isSafari ( ) || Lib . isMacWKWebView ( ) || Lib . isIOS ( ) ;
23
23
24
24
if ( window . navigator . userAgent && ! unsupportedBrowser ) {
25
25
var declarations = Array . from ( constants . CSS_DECLARATIONS ) . reverse ( ) ;
You can’t perform that action at this time.
0 commit comments