Problem:
Umami theme has lots of display issues in Internet Explorer.
- main menu links are not displayed - major usability bug
- logo image is stretched vertically
- Text in banner is at top of image, rather than midway down
- Promoted Articles heights are equal but not correct
- Frontpage view flexbox is not working (probably just need to add in a prefix
ms-flex - Articles listing page - flexbox is not working
- Article node - is sidebar working
- Recipe node - same issue with sidebar
- Recipe node - icons and text are squashed on top of each other
- Recipe node - ingredients and instructions flexbox is not working
- Taxonomy term page - flexbox not working
- Search block - icon missing
Internet Explorer 11 is one of the supported browsers for D8.
| Comment | File | Size | Author |
|---|---|---|---|
| #38 | 11--after.png | 424.72 KB | smaz |
| #38 | 11--before.png | 574.87 KB | smaz |
| #38 | 10--after.png | 575.48 KB | smaz |
| #38 | 10--before.png | 257.44 KB | smaz |
| #38 | 8--9--after.png | 647.87 KB | smaz |
Comments
Comment #2
andrewmacpherson commentedAs far as I know we haven't set a date or D8 version which will end support for IE11
Comment #3
larowlanComment #4
markconroy commentedComment #5
smazWe reviewed IE11 in our weekly call yesterday, and @markconroy has updated the initial issue with the full list of issues we found.
Here's the screenshots:
* Main menu links not displayed + Search icon missing:
* Text in banner at top of the image, not centred vertically:
* Recipe icons are collapsing together:
* Homepage promoted articles:
* Frontpage recipes flexbox not working:
* Articles list page not flexing:
* Article node: Main page content is very wide & sidebar is off-screen:
Comment #6
mherchelComment #7
nicholassStarting to work on this at #FLDC18
Comment #8
jordanastarting to work on this @florida drupal camp 2018 #fldc18
Comment #9
mherchelThis patch fixes the header for the site in IE11.
Comment #10
mherchelThis media query will target only IE10 (which doesn't matter) and IE11 browsers.
I tried for hours to get IE11 to play nicely with this SVG background image and was unsuccessful. So, instead we're loading a PNG.
IE11 does not support "initial". Setting to none, which is the initial value.
Ie11 does not support CSS calc within flexbox shorthand. Writing it out works around the bug.
IE11 handles SVGs like 💩. Specifying the correct width/height here fixes it and does not impact other browsers.
Comment #11
nicholassThis fixes the recipe node types layout issues in IE11
Comment #12
nicholassIE11 does not handle the calc in flexbox shorthand https://github.com/philipwalton/flexbugs#flexbug-8
IE11 has issues with flex children having padding so they need the max-widths restated https://github.com/philipwalton/flexbugs/issues/3
Comment #13
mherchelThis fixes the homepage banner vertical centering issue in IE💩11
Comment #14
mherchelcrap. that includes the previous patch. This patch is the vertical centering issue fix only,
Comment #15
jordanaCreated patch for IE11 issue where on the homepage the Recipes take up full width.
This is because of an IE11 Flexbox issue where it ignores shorthand calc.
To fix this you need to write out the calc out under "flex-basis" instead of in flex.
So changes from
flex: 0 0 calc(50% - 28px);to
Comment #16
jordanaIn IE11 the columns under the banner are stretched and very long. First "carrot" column is fixed by adding a height value to it. (height 0 removes background color, so added height: 100%)
Comment #17
andrewmacpherson commentedRe: #10.1 , using the high-contrast media query to identify MSIE...
Be careful - the media query doesn't just target MSIE; MS Edge responds to it too.
(Aside: Firefox on Windows responds when a Windows High Contrast theme is active, but doesn't support this CSS media query. There was some discussion in the Mozilla bugtracker about whether to implement this media query, but they seem to have decided against it.)
Using it to detect an MS browser regardless of whether a HC theme is active is a bit of a hack IMO. Sure, it's valid CSS, but it subverts the intended use of the media query. Be aware that we might want to use it properly for #2894237: Make core themes more robust in Windows High-Contrast mode.
If you do use it this way, AVOID using it to change colour properties, especially if it involves the
transparentkeyword or system color keywords.I made a test page for various forms of the media query: MS High Contrast Media Query Test Page
Comment #18
mherchelUploading combined patch that includes all previous patches.
Comment #19
mherchel@andrewmacpherson great point. The correct way to do this would be to modify the SVG... which I wasn't able to do (at least while sprinting). I'll mess with it today to see if I can get it working now that I'm back at my regular workspace.
Comment #20
mherchelAttached is a patch that edits the search SVG icon to work in all browsers including IE. So, we do not need the PNG anymore.
Comment #21
mherchelSo, this is where the last patch is at in IE11. You can see that we have the header, search icon, nav, and some frontpage views fixed.
The middle stretched frontpage view is a complete pain-in-the-💩, and I haven't been able to figure that out yet.
Comment #22
nicholassAdding the same IE11 flexbox calc shorthand fixes for the grids
Comment #23
nicholassIgnore patch in comment #22 had a copy and paste error. Corrected patch attached.
Comment #24
markconroy commentedComment #25
markconroy commentedComment #26
tomphippen commentedI've got the stretched homepage view fixed locally, and I'm pretty sure it's the same issue as the articles listing page.
I'll get that, and anything else I can from the list, done this afternoon and post a patch later.
Comment #27
mherchel@tomphippen Nice! I wasn't able to find a solution to that short of 1) specifying an arbitrary height, or 2) modifying the templates markup.
Comment #28
tomphippen commented@mherchel I've sort of gone for 1, but with a height based on a mixture of the viewport width & the grid layout it's in.
It's not a perfect solution but I think it's good enough & keeps it the same across browsers rather than doing something clever.
I've got my patch attached, it's my first drupal patch so I'm hoping I've got it right, it should include
- All the previous patches
- A fix to the height of the logo in IE11 on Windows 7 (which acts in a different way to other versions)
- Setting flex-basis on
node--view-mode-highlighted-small .node__contentas described above to stop the heights going crazy on the article, recipe & taxonomy pages- Adding flex-basis and a couple of other tweaks to fix the same issue on the frontpage view
- Fixed the sidebar issue
I do need to do a thorough cross browser test in Firefox and Edge to make sure these fixes haven't caused regressions elsewhere, will do that tomorrow.
Comment #29
mherchelAwesome. You might want to consider limiting the arbitrary height to IE11. My thought is that if the person demoing the profile modifies the view, the arbitrary height will probably become invalid. Limiting it to IE11 could mitigate this. https://philipnewcomer.net/2014/04/target-internet-explorer-10-11-css/
Just a thought :)
Comment #30
tomphippen commentedThat's a good point I hadn't considered.
The good news is I don't think it'll be an issue in this case. As those columns are using flexbox with the flex-direction set to column the height is being set with flex-basis, which means decent browsers will correctly increase it. It does break in IE11, but would do the same if the code was just targeted at it.
So I'd still argue sticking with the same code for all browsers is the least bad option (especially with @andrewmacpherson's note on targeting IE with that media query). I've attached a screenshot of how Safari & IE11 handle a very tall image being used, Chrome & Edge work in the same way as Safari.
Comment #31
markconroy commentedComment #32
markconroy commentedComment #33
finnsky commentedAfter applying patch #28 catched bug with sidebar items broken because of flex-basis property.
https://gyazo.com/fdd934bb70261d459eecf1462cac0427
Comment #34
finnsky commentedAdded interdiff between #28 and #20
Comment #35
finnsky commentedBottom recipe title lost good alignment: https://gyazo.com/5c5166d1e21db4411f377915ad852865
Comment #36
finnsky commentedSuggested patch based on #20 because #28 contains some fixed values for flex bases which not needed imho. Image style may be changed. or image may be absent.
Contains all fixes, include grids. Please review.
Comment #37
kjay commentedThis CSS looks good to me and we've reviewed this as part of this week's OOTB meeting. @smaz about to follow up with his review.
Comment #38
smazOk, fresh review - I think this is good to go! Thanks everyone!
I've taken before & after screenshots of everything I reported in my initial post, and can confirm everything looks fine now. I've also had @kjay review the CSS, as that's his area of expertees :)
(Sorry, screenshots aren't amazing - smaller screen this time :( )
1, 2 & 12:
main menu links are not displayed - major usability bug
logo image is stretched vertically
Search block - icon missing
Before:

After:

3: Text in banner is at top of image, rather than midway down
Before:

After:

4: Promoted Articles heights are equal but not correct
Before:

After:

5: Frontpage view flexbox is not working (probably just need to add in a prefix ms-flex
Before:

After:

6: Articles listing page - flexbox is not working
Before:

After:

7: Article node - is sidebar working
Before:

After:

8 & 9:
Recipe node - same issue with sidebar
icons and text are squashed on top of each other
Before:


After:

10: Recipe node - ingredients and instructions flexbox is not working

Before:
After:

11: Taxonomy term page - flexbox not working

Before:
After:

Comment #39
smazAdding credit to @kjay for the review + testing this with me.
Comment #40
markconroy commentedSetting this back to Needs Review, just so we can check that these great fixes for IE11 don't break current versions of Chrome/Firefox/etc.
Comment #41
markconroy commentedComment #42
markconroy commentedHi,
I've given this patch a test in the latest versions of Chrome and Firefox and everything still seems to work as expected. Checked in it IE11 and everything is as the screenshots suggest it is. Bravo!!!
RTBC again.
Comment #43
gábor hojtsyComment #46
gábor hojtsyYay superb, thanks. The changes look fine to me as well.
Comment #51
lauriiiAdding credit from issue marked as duplicate to this #2943630: Umami theme: Safari 9.1 issues