From 339afbc66ea455b7fa526056e656f3eeb39c42e1 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 26 Dec 2014 12:48:02 +0100 Subject: [PATCH] Fixed a few issues related to IE's 'hasLayout' --- .../files/js/3rdParty/redactor/plugins/wbbcode.js | 15 ++++----------- wcfsetup/install/files/style/redactor.less | 8 ++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 0d428ca7ef..1a8c21b9d6 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -18,6 +18,10 @@ RedactorPlugins.wbbcode = function() { var $identifier = this.$textarea.wcfIdentify(); this.opts.initCallback = (function() { + if ($.browser.msie) { + this.$editor.addClass('msie'); + } + // use stored editor contents var $content = $.trim(this.wutil.getOption('woltlab.originalValue')); if ($content.length) { @@ -1449,17 +1453,6 @@ RedactorPlugins.wbbcode = function() { $editHeader.each((function(index, editHeader) { var $editHeader = $(editHeader); $editHeader.addClass('jsRedactorQuoteEdit').click($.proxy(this.wbbcode._observeQuotesClick, this)); - - if ($.browser.msie) { - var $outerDiv = $editHeader.parent().parent(); - $outerDiv.attr('contenteditable', false); - $outerDiv.children('div').attr('contenteditable', true); - - // prevent resize handles being displayed - $outerDiv.on('mscontrolselect', function(event) { - event.preventDefault(); - }); - } }).bind(this)); } }, diff --git a/wcfsetup/install/files/style/redactor.less b/wcfsetup/install/files/style/redactor.less index 8ebc2f9ac6..5f7d72bca7 100644 --- a/wcfsetup/install/files/style/redactor.less +++ b/wcfsetup/install/files/style/redactor.less @@ -164,6 +164,14 @@ } } } + + &.msie .quoteBox > .container { + /* resets 'hasLayout' causing IE to display resize handle and wonky editing behavior */ + min-height: auto; + overflow: visible; + + .clearfix; + } } @media all and (min-width: 801px) { -- 2.20.1