I have an Openseadragon
canvas with Fabricjs
overlay. I am adding a rectangle wherever user clicks on canvas. It works fine in MS Edge and Google Chrome but in Firefox it gives event is undefined
error.
Here is the plunker:
FabricJs Plunker
You need to pass options.originalEvent
instead of options.e
in
var rectLocation = overlay.fabricCanvas().getPointer(options.originalEvent);
Here is updated plunker.