May 28 2023 03:28 AM
Problem Description:
If a div is created in HTML and its fontFamily is set to an empty string, the browser crashes when rendering this div.
We have internally tested and found that this browser issue can be reproduced from version 1774.42 and above.
The following is a demo code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
const _mustExistDefaultFont = 'Arial'
const font = ''
const testClick = (text = '', font = '') => {
const el = document.getElementById('testFont')
el.style.fontFamily = `'${font}'`;
console.log('click');
}
</script>
<button onclick="testClick()">测量</button>
<div id="testFont"></div>
</body>
</html>
May 28 2023 07:34 PM
May 28 2023 11:51 PM
@liaozichao I have uploaded the attachment that reliably reproduces the crash. Can Microsoft's technical personnel please take a look? Thank you.