Issue #3270108 by bnjmnm, Wim Leers: Editor does not load when using Edge + WHCM
parent
2fbd9f71bc
commit
bac77053c4
|
@ -90,7 +90,6 @@ ie11.user.warnings:
|
|||
- core/drupal
|
||||
- core/drupal.message
|
||||
- editor/drupal.editor
|
||||
- core/modernizr
|
||||
|
||||
ie11.filter.warnings:
|
||||
js:
|
||||
|
@ -99,7 +98,6 @@ ie11.filter.warnings:
|
|||
- core/drupal
|
||||
- core/drupal.message
|
||||
- core/once
|
||||
- core/modernizr
|
||||
|
||||
drupal.ckeditor5.filter.admin:
|
||||
js:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Provides IE11 compatibility warnings when choosing a text editor.
|
||||
*/
|
||||
|
||||
((Drupal, once, Modernizr) => {
|
||||
((Drupal, once) => {
|
||||
/**
|
||||
* Presents a warning when selecting CKEditor 5 as a text format's text editor.
|
||||
*
|
||||
|
@ -11,9 +11,7 @@
|
|||
*/
|
||||
Drupal.behaviors.ckEditor5warn = {
|
||||
attach: function attach() {
|
||||
const isIE11 = Modernizr.mq(
|
||||
'(-ms-high-contrast: active), (-ms-high-contrast: none)',
|
||||
);
|
||||
const isIE11 = !!document.documentMode;
|
||||
const editorSelect = once(
|
||||
'editor-ie11-warning',
|
||||
'[data-drupal-selector="filter-format-edit-form"] [data-drupal-selector="edit-editor-editor"], [data-drupal-selector="filter-format-add-form"] [data-drupal-selector="edit-editor-editor"]',
|
||||
|
@ -120,4 +118,4 @@
|
|||
}
|
||||
},
|
||||
};
|
||||
})(Drupal, once, Modernizr);
|
||||
})(Drupal, once);
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
* @preserve
|
||||
**/
|
||||
|
||||
(function (Drupal, once, Modernizr) {
|
||||
(function (Drupal, once) {
|
||||
Drupal.behaviors.ckEditor5warn = {
|
||||
attach: function attach() {
|
||||
var isIE11 = Modernizr.mq('(-ms-high-contrast: active), (-ms-high-contrast: none)');
|
||||
var isIE11 = !!document.documentMode;
|
||||
var editorSelect = once('editor-ie11-warning', '[data-drupal-selector="filter-format-edit-form"] [data-drupal-selector="edit-editor-editor"], [data-drupal-selector="filter-format-add-form"] [data-drupal-selector="edit-editor-editor"]');
|
||||
|
||||
if (typeof editorSelect[0] !== 'undefined') {
|
||||
|
@ -66,4 +66,4 @@
|
|||
}
|
||||
}
|
||||
};
|
||||
})(Drupal, once, Modernizr);
|
||||
})(Drupal, once);
|
|
@ -3,10 +3,8 @@
|
|||
* Provide warnings when attempting to load CKEditor 5 on IE11.
|
||||
*/
|
||||
|
||||
((Drupal, Modernizr) => {
|
||||
const isIE11 = Modernizr.mq(
|
||||
'(-ms-high-contrast: active), (-ms-high-contrast: none)',
|
||||
);
|
||||
((Drupal) => {
|
||||
const isIE11 = !!document.documentMode;
|
||||
|
||||
// If the browser is IE11, create an alternate version of
|
||||
// Drupal.editors.ckeditor5 that provides warnings. In IE11, the incompatible
|
||||
|
@ -143,4 +141,4 @@
|
|||
},
|
||||
};
|
||||
}
|
||||
})(Drupal, Modernizr);
|
||||
})(Drupal);
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* @preserve
|
||||
**/
|
||||
|
||||
(function (Drupal, Modernizr) {
|
||||
var isIE11 = Modernizr.mq('(-ms-high-contrast: active), (-ms-high-contrast: none)');
|
||||
(function (Drupal) {
|
||||
var isIE11 = !!document.documentMode;
|
||||
|
||||
if (isIE11) {
|
||||
window.CKEditor5 = null;
|
||||
|
@ -64,4 +64,4 @@
|
|||
}
|
||||
};
|
||||
}
|
||||
})(Drupal, Modernizr);
|
||||
})(Drupal);
|
Loading…
Reference in New Issue