diff --git a/src/lib/core.js b/src/lib/core.js index 28578255f..a3d030819 100755 --- a/src/lib/core.js +++ b/src/lib/core.js @@ -4711,8 +4711,8 @@ export default function (context, pluginCallButtons, plugins, lang, options, _re _w.setTimeout(function () { try { iframe.focus(); - // IE or Edge - if (util.isIE_Edge || !!_d.documentMode || !!_w.StyleMedia) { + // IE or Edge, Chromium + if (util.isIE_Edge || util.isChromium || !!_d.documentMode || !!_w.StyleMedia) { try { iframe.contentWindow.document.execCommand('print', false, null); } catch (e) { diff --git a/src/lib/util.js b/src/lib/util.js index fe1dfa3bb..871808bfe 100755 --- a/src/lib/util.js +++ b/src/lib/util.js @@ -16,6 +16,7 @@ const util = { isIE: null, isIE_Edge: null, isOSX_IOS: null, + isChromium: null, _propertiesInit: function () { if (this._d) return; this._d = document; @@ -23,6 +24,7 @@ const util = { this.isIE = navigator.userAgent.indexOf('Trident') > -1; this.isIE_Edge = (navigator.userAgent.indexOf('Trident') > -1) || (navigator.appVersion.indexOf('Edge') > -1); this.isOSX_IOS = /(Mac|iPhone|iPod|iPad)/.test(navigator.platform); + this.isChromium = !!window.chrome; }, _allowedEmptyNodeList: '.se-component, pre, blockquote, hr, li, table, img, iframe, video, audio, canvas',