SVG images that rely solely on a viewBox attribute (without explicit
width/height) could not be zoomed in the image preview because they
have no intrinsic dimensions. CSS zoom had no effect since the SVG
would simply re-render to fill whatever container size it was given.
- Set explicit minWidth/minHeight on the image element when
naturalWidth/naturalHeight are 0, giving CSS zoom concrete pixel
dimensions to scale
- Handle firstZoom() division by zero when naturalWidth is 0 by
defaulting to scale 1x
- Clear explicit dimensions when returning to scale-to-fit mode
Fixes#240638
* Support copying non-pngs and wait for focus to avoid race conditions
* Remove the temporary canvas element after copying
* Update to place entire canvas creation inside promise.
* Increasing to 5 retries 20ms apart
Allow copying image from image preview
Fixes#171616
Lets you cmd+c / right click to copy images from the image preview
Also disables the copy/paste options in the other media previews since they don't currently support copying