Bug 257053 - Width of <mspace> can't be changed twice
Summary: Width of <mspace> can't be changed twice
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-19 14:32 PDT by pablo
Modified: 2023-05-26 14:33 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pablo 2023-05-19 14:32:58 PDT
Calling el.setAttribute('width', x) only works on the first time.

In the example below the width of the element is set to 10px in the HTML then changed to 100px and after 1sec changed to 10px again.
On Safari/iPadOS 16.4.1 the width stays at 100px. On Chrome and Firefox the width is changed to 10px as expected.

Test:
https://output.jsbin.com/pemutitula/1

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title></title>
</head>
<body>
  <math display="block">
    <mspace height="10px" width="10px"
          style="background: blue;"/>
  </math>
  <script>
    let el = document.getElementsByTagName('mspace')[0];
    el.setAttribute('width', '100px');
    setTimeout(() => {el.setAttribute('width', '10px');}, 1000);
  </script>
</body>
</html>
Comment 1 Radar WebKit Bug Importer 2023-05-26 14:33:20 PDT
<rdar://problem/109905631>