# Canvas drawing color bug

**URL:** <https://community.thunkable.com/t/canvas-drawing-color-bug/2939944>\
**Category:** Issues / Bugs\
**Created:** [April 10, 2024, 7:23pm UTC](https://community.thunkable.com/t/canvas-drawing-color-bug/2939944 "2024-04-10T19:23:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![john\_shelby\_hhs](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@john\_shelby\_hhs](https://community.thunkable.com/u/john_shelby_hhs)\
**Post date:** [April 10, 2024, 7:23pm UTC](https://community.thunkable.com/t/canvas-drawing-color-bug/2939944/1 "2024-04-10T19:23:00Z")

</div>

Hi Thunkable folks,  
I have a simple drawing app that has a funny bug in it. The same app worked about a year ago, so it seems like it is potentially due to a Thunkable change.

You can find the app here: [Thunkable](https://x.thunkable.com/copy/3064d08adea7cd940fb55a454e5c7470)

This app runs fine for me on my device, but it crashes immediately in the Web Preview. I have determined the the culprit is setting a Canvas Stage’s “drawing color” when the screen is opening. This crashes the web preview:  
 ![2024-04-10 12_20_13-Window](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/e/8e612ad31c7597b9526626052dde82e6fc138cd6.png)

The problem is that I want to have an “options” screen, and I need to set the drawing color when I return from that options screen. So I need to set the color on Screen Open - and I’m not sure what other event to use so it’s set appropriately. The crash is avoided if I stick a “wait 1 second” block at the top - I assume this gives the canvas a moment to load first - but feels like a hack.

Any ideas?

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [April 10, 2024, 7:37pm UTC](https://community.thunkable.com/t/canvas-drawing-color-bug/2939944/2 "2024-04-10T19:37:09Z")

</div>

Hello @john_shelby_hhs  
I understand that is frustrating  
We were able to replicate the issue and have flagged it to our engineering team. We’re committed to finding a resolution quickly, and we will keep you updated as soon as there is any progress.  
Thank you again for alerting us to this issue and for your time and patience while we work to resolve it.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [May 8, 2024, 12:18pm UTC](https://community.thunkable.com/t/canvas-drawing-color-bug/2939944/3 "2024-05-08T12:18:05Z")

</div>

Hello @john_shelby_hhs  
Thank you again for your patience. I would like to let you know that we have now officially released a fix for this bug.

Please keep in mind that you may need to do a [hard refresh](https://docs.thunkable.com/getting-started/data-sources/data-sources#hard-refresh-your-browser) of your browser for the changes to take effect in your project. If your [web app](https://docs.thunkable.com/publishing-apps/publish-as-a-web-app-pro) is affected by this bug, you will need to re-publish it for these changes to take effect.

---

<div class="post-metadata">

**Author:** ![tiny\_apps](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@tiny\_apps](https://community.thunkable.com/u/tiny_apps)\
**Post date:** [May 8, 2024, 1:16pm UTC](https://community.thunkable.com/t/canvas-drawing-color-bug/2939944/4 "2024-05-08T13:16:48Z")

</div>

Can you put that block under when canvas initiate rather than under when screen opens.
