InvokeAI: [bug]: Unified canvas doesn't work on firefox

Is there an existing issue for this?

  • I have searched the existing issues

OS

macOS

GPU

cuda

VRAM

12GB

What happened?

On firefox, when using the webUI, painting on the unified canvas no longer works. It works fine on chrome.

When I click on the canvas with the brush or eraser selected I get the following error in the developer console.

Uncaught TypeError: e.layerState.objects.findLast is not a function

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Oops, I had forgotten about the polyfill being needed.

There was another issue with Array.prototype.findLast (it has no type definitions in typescript 4) and conflated the manual type defs with the polyfill. I removed the polyfill while doing a code cleanup.

Will fix. Sorry.

I’ve PR’d a quick fix (polyfilling Array.prototype.findLast() via build plugin) in #1909. We can use additional functionality provided by this plugin if we need to broaden browser support at some point.

https://caniuse.com/mdn-javascript_builtins_array_findlast

I will update the compilation target to something more conservative to ensure this is polyfilled.