diff --git a/packages/block-library/src/file/utils/index.js b/packages/block-library/src/file/utils/index.js index 8e8bb811dd038a..283565f47bd98c 100644 --- a/packages/block-library/src/file/utils/index.js +++ b/packages/block-library/src/file/utils/index.js @@ -5,6 +5,11 @@ * @return {boolean} Whether or not the browser supports inline PDFs. */ export const browserSupportsPdfs = () => { + // Use native feature detection if available. + if ( window.navigator.pdfViewerEnabled ) { + return true; + } + // Most mobile devices include "Mobi" in their UA. if ( window.navigator.userAgent.indexOf( 'Mobi' ) > -1 ) { return false;