Error loading image into offscreen element when image is cached

Confirmed Issue #10401095 • Assigned to Daniel C.

Details

Author
tim t.
Created
Jan 4, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

When I attempt to load an image into an offscreen image element, it will fail to load if the image has already been cached by the browser.

I can repro this in the edge browser (Microsoft Edge 38.14393.0.0; Microsoft EdgeHTML 14.14393) in windows 10 (enterprise evaluation version 1607). I have not been able to repro in IE11.

I attempt to load the image like so:

var image = new Image();
image.crossOrigin = 'anonymous';
image.onload = function() {
  console.log('image load succeeded');
}
image.onerror = function() {
  console.log('image load failed!');
}
image.src = '...';

I’m using the crossOrigin attribute, since I hope to eventually use the image on a canvas element.

If the image has already been loaded and cached by the page, it will trigger the onerror handler. If the image has not been loaded and cached, it will trigger onload.

Here is some example code that exhibits the issue: https://github.com/timmorey/edge-image-bug. In edge, if you load the page as is and click the button, the image will fail to load. If instead you comment out the `

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Travis L.”

      Changed Status to “Confirmed”

      Changed Assigned To from “Travis L.” to “Daniel C.”

    You need to sign in to your Microsoft account to add a comment.

    Sign in