From 380a71d7b9f6dca566f3daaf2921e8df68626eff Mon Sep 17 00:00:00 2001 From: Samuel Georges Date: Sat, 4 Mar 2017 14:55:19 +1100 Subject: [PATCH] IE11 will not honor height 100% when overflow is used on the Y axis Fixes #2672 --- modules/backend/assets/js/backend.js | 28 ++++++++++++++++++++++++ modules/backend/assets/js/october-min.js | 8 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/modules/backend/assets/js/backend.js b/modules/backend/assets/js/backend.js index 4ccf33973..3e64787ff 100644 --- a/modules/backend/assets/js/backend.js +++ b/modules/backend/assets/js/backend.js @@ -208,3 +208,31 @@ $.fn.extend({ } }) */ + +/* + * Browser Fixes + * - If another fix using JS is necessary, move this logic to backend.fixes.js + */ + +/* + * Internet Explorer v11 + * - IE11 will not honor height 100% when overflow is used on the Y axis. + */ +if (!!window.MSInputMethodContext && !!document.documentMode) { + $(window).on('resize', function() { + fixMediaManager() + fixSidebar() + }) + + function fixMediaManager() { + var $el = $('div[data-control="media-manager"] .control-scrollpad') + $el.height($el.parent().height()) + } + + function fixSidebar() { + var $el = $('#layout-sidenav'), + menuHeight = $('#layout-mainmenu').height() + + $el.height(Math.max($('#layout-body').innerHeight(), $(window).height() - menuHeight)) + } +} diff --git a/modules/backend/assets/js/october-min.js b/modules/backend/assets/js/october-min.js index b8f1fa276..7ae404141 100644 --- a/modules/backend/assets/js/october-min.js +++ b/modules/backend/assets/js/october-min.js @@ -1342,4 +1342,10 @@ callback()} img.src=source})}};return o;};assetManager=new AssetManager();if($.oc===undefined) $.oc={} $.oc.escapeHtmlString=function(string){var htmlEscapes={'&':'&','<':'<','>':'>','"':'"',"'":''','/':'/'},htmlEscaper=/[&<>"'\/]/g -return(''+string).replace(htmlEscaper,function(match){return htmlEscapes[match];})} \ No newline at end of file +return(''+string).replace(htmlEscaper,function(match){return htmlEscapes[match];})} +if(!!window.MSInputMethodContext&&!!document.documentMode){$(window).on('resize',function(){fixMediaManager() +fixSidebar()}) +function fixMediaManager(){var $el=$('div[data-control="media-manager"] .control-scrollpad') +$el.height($el.parent().height())} +function fixSidebar(){var $el=$('#layout-sidenav'),menuHeight=$('#layout-mainmenu').height() +$el.height(Math.max($('#layout-body').innerHeight(),$(window).height()-menuHeight))}} \ No newline at end of file