Browse Source

! Don't disable the WYSIWYG editor in IE11

Signed-off-by: Michael Eshom <[email protected]>
Michael Eshom 11 years ago
parent
commit
457cb2fc39
2 changed files with 3 additions and 1 deletions
  1. 1 1
      Themes/default/GenericControls.template.php
  2. 2 0
      Themes/default/scripts/script.js

+ 1 - 1
Themes/default/GenericControls.template.php

@@ -111,7 +111,7 @@ function template_control_richedit($editor_id, $smileyContainer = null, $bbcCont
 				$(".sceditor-container").width("100%").height("100%");',
 				$editor_context['rich_active'] ? '' : '
 				$("#' . $editor_id . '").data("sceditor").setTextMode();', '
-				if (!(is_ie || is_ff || is_opera || is_safari || is_chrome))
+				if (!(is_ie || is_ie11 || is_ff || is_opera || is_safari || is_chrome))
 				{
 					$("#' . $editor_id . '").data("sceditor").setTextMode();
 					$(".sceditor-button-source").hide();

+ 2 - 0
Themes/default/scripts/script.js

@@ -14,6 +14,8 @@ var is_safari = ua.indexOf('applewebkit') != -1 && !is_chrome;
 var is_webkit = ua.indexOf('applewebkit') != -1;
 
 var is_ie = ua.indexOf('msie') != -1 && !is_opera;
+// Stupid Microsoft...
+var is_ie11 = ua.indexOf('trident') != -1 && ua.indexOf('gecko') != -1;
 var is_iphone = ua.indexOf('iphone') != -1 || ua.indexOf('ipod') != -1;
 var is_android = ua.indexOf('android') != -1;