Bug 1255428 - [admin portal] top-left corner distorted in New Host dialog with IE 11
Summary: [admin portal] top-left corner distorted in New Host dialog with IE 11
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.4
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ovirt-3.6.1
: 3.6.0
Assignee: Vojtech Szocs
QA Contact: Jiri Belka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-20 14:33 UTC by Jiri Belka
Modified: 2016-04-20 01:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-20 01:10:12 UTC
oVirt Team: UX
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
screenshot (133.52 KB, image/png)
2015-08-20 14:33 UTC, Jiri Belka
no flags Details
Original image (129.07 KB, image/png)
2015-09-17 10:31 UTC, Vojtech Szocs
no flags Details
Image with no-size fix (128.73 KB, image/png)
2015-09-17 10:32 UTC, Vojtech Szocs
no flags Details
Image with auto-size fix (127.53 KB, image/png)
2015-09-17 10:32 UTC, Vojtech Szocs
no flags Details
IE's buggy image handling (90.00 KB, image/png)
2015-09-17 10:42 UTC, Vojtech Szocs
no flags Details
verification - screenshot (216.75 KB, image/png)
2015-12-02 12:17 UTC, Jiri Belka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 46377 0 master MERGED webadmin,userportal: Fix IE image size quirk Never
oVirt gerrit 46726 0 ovirt-engine-3.6 MERGED webadmin,userportal: Fix IE image size quirk Never

Description Jiri Belka 2015-08-20 14:33:45 UTC
Created attachment 1065287 [details]
screenshot

Description of problem:
top-left corner distorted in New Host dialog with IE 11. See screenshot.

Version-Release number of selected component (if applicable):
rhevm-webadmin-portal-3.5.4.2-1.3.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. ie11 w7 x64
2. new host dialog
3.

Actual results:
top-letft corner of the dialog is distorted

Expected results:
niceeeee

Additional info:

Comment 1 Einav Cohen 2015-08-21 14:11:24 UTC
Jiri, is it only in the New Host dialog? other dialogs look fine on IE11?

Comment 2 Alexander Wels 2015-08-28 14:11:04 UTC
It appears to be all dialogs. I just installed IE11 to take a look and there are several graphical issues with it. One of which is the corner of the dialog is missing.

Comment 3 Vojtech Szocs 2015-09-16 16:37:29 UTC
I can reproduce this on IE10 as well.

Comment 4 Vojtech Szocs 2015-09-17 10:31:39 UTC
Created attachment 1074389 [details]
Original image

Comment 5 Vojtech Szocs 2015-09-17 10:32:09 UTC
Created attachment 1074390 [details]
Image with no-size fix

Comment 6 Vojtech Szocs 2015-09-17 10:32:29 UTC
Created attachment 1074391 [details]
Image with auto-size fix

Comment 7 Vojtech Szocs 2015-09-17 10:42:33 UTC
Created attachment 1074392 [details]
IE's buggy image handling

Comment 8 Vojtech Szocs 2015-09-17 10:58:23 UTC
Root cause:

IE automatically adds "width" and "height" attributes, with their values computed from "src" attribute, when an <img> element is created via "new Image" constructor function. See [IE's buggy image handling] screenshot.

In oVirt UI, this causes the reported "top-left dialog corner messed up" issue, since the "src" attribute points to 1x1 image (clear.cache.gif) and the actual image comes through CSS styling. See [Original image] screenshot.

There are two fixes:

a, remove "width" and "height" attributes, see [Image with no-size fix] screenshot

b, set "width" and "height" attributes to value "auto", see [Image with auto-size fix] screenshot

Solution b, seems to be more appropriate.


Summary:

This is not a bug in oVirt UI or GWT framework itself, this is an IE-specific issue that we need to work around.

(According to HTML spec, "width" and "height" are optional when creating an <img> element.)

Comment 9 Vojtech Szocs 2015-09-17 12:10:08 UTC
I wrote a fiddle that illustrates a possible fix that works globally (for all <img> elements): http://jsfiddle.net/0oaywv8e/

This fix is IE9+ compatible.

Comment 10 Einav Cohen 2015-09-29 00:36:37 UTC
[not included in latest 3.6 build - moving back to MODIFIED]

Comment 11 Jiri Belka 2015-12-02 12:16:22 UTC
ok, rhevm-webadmin-portal-3.6.1-0.2.el6.noarch

currect check with ie11

<img width="auto" height="auto" class="obrand_dialogHeaderLeftPanel" src="clear.cache.gif">

Comment 12 Jiri Belka 2015-12-02 12:17:08 UTC
Created attachment 1101458 [details]
verification - screenshot

Comment 13 Vojtech Szocs 2015-12-07 16:49:23 UTC
Thanks Jirko for verification.

> <img width="auto" height="auto" class="obrand_dialogHeaderLeftPanel"
> src="clear.cache.gif">

Yes, this is the IE-specific fix.

In "normal" browsers like Firefox or Chrome, it is:

  <!-- src points to 1x1 placeholder, actual image comes from CSS class -->
  <img class="obrand_dialogHeaderLeftPanel" src="clear.cache.gif">

Whereas in IE it becomes:

  <!-- IE adds width/height based on src which is NOT what we want -->
  <img width="1" height="1" class="obrand_dialogHeaderLeftPanel" src="clear.cache.gif">

So we're using "auto" to work around IE.


Note You need to log in before you can comment on or make changes to this bug.