diff --git a/web_src/js/bootstrap.js b/web_src/js/bootstrap.js index c0047b0ac2..698d17fa36 100644 --- a/web_src/js/bootstrap.js +++ b/web_src/js/bootstrap.js @@ -6,10 +6,18 @@ // This file must be imported before any lazy-loading is being attempted. __webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`; +const filteredErrors = new Set([ + 'getModifierState is not a function', // https://github.com/microsoft/monaco-editor/issues/4325 +]); + export function showGlobalErrorMessage(msg) { const pageContent = document.querySelector('.page-content'); if (!pageContent) return; + for (const filteredError of filteredErrors) { + if (msg.includes(filteredError)) return; + } + // compact the message to a data attribute to avoid too many duplicated messages const msgCompact = msg.replace(/\W/g, '').trim(); let msgDiv = pageContent.querySelector(`.js-global-error[data-global-error-msg-compact="${msgCompact}"]`);