Showing
1 changed file
with
3 additions
and
1 deletions
... | ... | @@ -553,7 +553,9 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t |
553 | 553 | var aspect = imageAspectMap[urlHashCode]; |
554 | 554 | if (angular.isUndefined(aspect)) { |
555 | 555 | var testImage = document.createElement('img'); // eslint-disable-line |
556 | - testImage.style.visibility = 'hidden'; | |
556 | + testImage.style.position = 'absolute'; | |
557 | + testImage.style.left = '-99999px'; | |
558 | + testImage.style.top = '-99999px'; | |
557 | 559 | testImage.onload = function() { |
558 | 560 | aspect = testImage.width / testImage.height; |
559 | 561 | document.body.removeChild(testImage); //eslint-disable-line | ... | ... |