Bug 246498 - Canvas strokeStyle does not always get applied
Summary: Canvas strokeStyle does not always get applied
Status: RESOLVED DUPLICATE of bug 245465
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 18:31 PDT by Jon Woyame
Modified: 2022-10-16 18:59 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Woyame 2022-10-13 18:31:53 PDT
Safari's <canvas> has fairly recently acquired a regression where `strokeStyle` is not getting applied properly.

As stroke() is called iteratively, it sometimes uses older color values, despite `strokeStyle` being changed prior to the call.

This has been documented with a code snippet on Stack Overflow:

https://stackoverflow.com/questions/74050672/html5-canvas-context-does-not-update-in-safari

It is also observed in a similar example by @Kaiido:

https://jsfiddle.net/7awL4fg3/

This has been tested on a MacBook Pro with Apple Silicon, and several iPhones.

It is present in Safari 16 and Safari Technology Preview.
Comment 1 Alexey Proskuryakov 2022-10-16 18:59:56 PDT
Sounds like bug 245465 (please see its dupes for details).

Please verify with a future Safari Technology Preview, once release notes say that it's beyond 254889@main.

*** This bug has been marked as a duplicate of bug 245465 ***