Unverified Commit 077ba1bc authored by Lauri Timmanee's avatar Lauri Timmanee
Browse files

Issue #3270108 by bnjmnm, Wim Leers: Editor does not load when using Edge + WHCM

(cherry picked from commit bac77053)
parent 1ee6c360
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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 −5
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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);
 No newline at end of file
})(Drupal, once);
 No newline at end of file
+3 −5
Original line number Diff line number Diff line
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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);
 No newline at end of file
})(Drupal);
 No newline at end of file