From: Alexander Ebert Date: Fri, 6 Jan 2017 16:42:18 +0000 (+0100) Subject: Disable editor bar toggle on WP/Edge X-Git-Tag: 3.0.0~27 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=02b4aefe03f68981765aa15363891bcaa2dc227e;p=GitHub%2FWoltLab%2FWCF.git Disable editor bar toggle on WP/Edge --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js index 687c978a5d..e8b7818599 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabEvent.js @@ -17,21 +17,24 @@ $.Redactor.prototype.WoltLabEvent = function() { }).bind(this)) }).bind(this)); - this.$editor[0].addEventListener('focus', function () { - _activeInstances++; - - document.documentElement.classList.add('redactorActive'); - }); - this.$editor[0].addEventListener('blur', function () { - _activeInstances--; - - // short delay to prevent flickering when switching focus between editors - window.setTimeout(function () { - if (_activeInstances === 0) { - document.documentElement.classList.remove('redactorActive'); - } - }, 100); - }) + var ua = window.navigator.userAgent.toLowerCase(); + if (ua.indexOf('windows phone') === -1 && ua.indexOf('edge/') === -1) { + this.$editor[0].addEventListener('focus', function () { + _activeInstances++; + + document.documentElement.classList.add('redactorActive'); + }); + this.$editor[0].addEventListener('blur', function () { + _activeInstances--; + + // short delay to prevent flickering when switching focus between editors + window.setTimeout(function () { + if (_activeInstances === 0) { + document.documentElement.classList.remove('redactorActive'); + } + }, 100); + }); + } }, _setEvents: function(EventHandler) {