Skip to content

Commit 976fd20

Browse files
committed
Explicitly set CSS attributes for IE to resize
- IE does not automatically resize images to fit window size. Explicitly set max-width=100% and height=auto to fix this issue.
1 parent 227cae5 commit 976fd20

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mfr/extensions/image/templates/viewer.mako

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@
103103
## issue mentioned below.
104104
## 2. Images are displayed in its actual size. No issue for all supported
105105
## browsers.
106-
baseImage.wrap("<div></div>").parent().css("display", "inline-block");
106+
baseImage.wrap("<div></div>").parent().css({
107+
"display": "inline-block",
108+
"max-width": "100%", // need to be explicit for IE
109+
"height": "auto" // need to be explicit for IE
110+
});
107111
} else {
108112
## Quirks: Chrome has a flickering bug when images are wrapped with `<div>` or
109113
## `<span>`. During zoom the scroll bar keeps appearing and disappearing which

0 commit comments

Comments
 (0)