File tree Expand file tree Collapse file tree
src/vs/base/browser/ui/aria Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import 'vs/css!./aria';
77import { isMacintosh } from 'vs/base/common/platform' ;
88import * as dom from 'vs/base/browser/dom' ;
99
10+ // Use a max length since we are inserting the whole msg in the DOM and that can cause browsers to freeze for long messages #94233
11+ const MAX_MESSAGE_LENGTH = 20000 ;
1012let ariaContainer : HTMLElement ;
1113let alertContainer : HTMLElement ;
1214let statusContainer : HTMLElement ;
@@ -54,6 +56,9 @@ function insertMessage(target: HTMLElement, msg: string): void {
5456 }
5557
5658 dom . clearNode ( target ) ;
59+ if ( msg . length > MAX_MESSAGE_LENGTH ) {
60+ msg = msg . substr ( 0 , MAX_MESSAGE_LENGTH ) ;
61+ }
5762 target . textContent = msg ;
5863
5964 // See https://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/
You can’t perform that action at this time.
0 commit comments