Problem/Motivation
When high contrast mode is enabled and using Edge, this check returns true:
Modernizr.mq(
'(-ms-high-contrast: active), (-ms-high-contrast: none)'
)
This results in the IE killswitch in the CKEditor 5 module being activated, and CKEditor 5 does not load at all despite Edge being a supported browser for CKEditor 5
According to MDN, ms-high-contrast support was removed as of Edge 18 (I'm currently running Edge 98) , but apparently when high contrast mode is enabled, something is present in a Modernizr-detecting capacity.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#5 | ie11-still-warns.png | 243.28 KB | bnjmnm |
#5 | edge-whcm-editor-with-fix.png | 1.03 MB | bnjmnm |
Issue fork drupal-3270108
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3270108-editor-does-not changes, plain diff MR !1983
Comments
Comment #2
Wim LeersComment #3
bnjmnmComment #5
bnjmnmSwitched the detection method to the one jQuery uses (
const isIE11 = !!document.documentMode;
).CKEditor 5 now loads in Edge while WHCM is enabled:
(btw this issue exists for the fact that WHCM doesn't look too great #3270130: [upstream] CKEditor 5 toolbar UI (+ Drupal's admin UI for configuring it) *technically* has WHCM regression)
IE11 still gets the warning as expected:
Comment #6
Wim LeersUsing the same battle-tested detection technique that jQuery used was exactly what I wanted to suggest! 🤓😄
Comment #7
Wim LeersComment #9
lauriiiTested manually with IE 11 to confirm that the message is still visible and tested with Edge to confirm that CKEditor 5 is loaded on both when high contrast is enabled and disabled.
Will commit after the test run is back ✌️
Comment #13
lauriiiCommitted e2b5903 and pushed to 10.0.x. Also committed to 9.4.x and cherry-picked to 9.3.x. Thanks!