Created attachment 462469 [details] Demo HTML/JS Major bug in Safari 16 (iOS and macOS) when drawing paths with strokeStyle in 2D canvas. The demo code below draws three small lines. One red, one blue, and the last one red. In Safari 16, the third line is incorrectly colored blue. ``` <html> <body> <canvas id="canvas"></canvas> <script> const canvas = document.getElementById('canvas'); const context = canvas.getContext('2d'); context.lineWidth = 6; context.beginPath(); context.strokeStyle = 'red'; context.moveTo(30, 50); context.lineTo(50, 50); context.stroke(); context.beginPath(); context.strokeStyle = 'blue'; context.moveTo(60, 50); context.lineTo(80, 50); context.stroke(); context.beginPath(); context.strokeStyle = 'red'; context.moveTo(90, 50); context.lineTo(110, 50); context.stroke(); </script> </body> </html> ``` In all other browsers, including previous versions of Safari, the strokeStyle color is adhered to on a third call. In Safari 16, it does not update the color and it stays on the previous color.
*** This bug has been marked as a duplicate of bug 245145 ***