Problem/Motivation
CKEditor 5 35.2.1 is out: https://github.com/ckeditor/ckeditor5/releases/tag/v35.2.1
Steps to reproduce
Proposed resolution
- Update
core/package.json cd coreyarn installyarn buildyarn build:ckeditor5-types
Remaining tasks
Fix test failures in the image url widget test
User interface changes
API changes
Data model changes
Release notes snippet
The version of CKEditor 5 has been updated from 35.1.0 to 35.2.1
| Comment | File | Size | Author |
|---|---|---|---|
| #22 | core-update-cke5-9.4.x-3313946-22.patch | 3.92 MB | nod_ |
| #18 | interdiff-16-18.txt | 2.02 KB | nod_ |
| #18 | core-update-cke5-9.5.x-3313946-18.patch | 3.92 MB | nod_ |
| #16 | core-update-cke5-9.5.x-3313946-16.patch | 3.92 MB | nod_ |
Issue fork drupal-3313946
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:
- 3313946-update-ckeditor-5
changes, plain diff MR !2894
Comments
Comment #2
longwaveComment #4
wim leersThere were actually five errors in the failure above.
/var/www/html/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php:91failed 4 times, and contains:
/var/www/html/core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php:109failed once and contains the same.So we need to investigate why/how CKEditor 35.2.0 broke our plugins/tests.
If I check the release notes at https://github.com/ckeditor/ckeditor5/releases/tag/v35.2.0, seems most likely: https://github.com/ckeditor/ckeditor5/issues/12215. Investigation needed though.
Comment #6
nod_So the selenium driver triggers a blur event on the input when using the
setValuemethod. This blur makes the CKE5 tooltip disapear, and the insert button ends up ineffective => test failures.When setValue does not trigger the blur event (with some manual hack) things work as expected.
Comment #8
nod_35.2.1 has been released last week
Comment #9
nod_I think the issue comes from this merge request: https://github.com/ckeditor/ckeditor5/pull/12319/ specifically this commit: https://github.com/ckeditor/ckeditor5/pull/12319/commits/633dead6b6d1a2d...
When adding text to an input, selenium will add the text and then trigger a blur() on the input element. It seems that this blur event (used let the browser trigger a "change" event if necessary) makes the dropdown close and our test fail.
Comment #10
nod_If we defer the blur event from the Selenium2Driver method, tests pass.
Comment #11
nod_Yup, all green.
The issue is not a problem or a regression. CKE5 behaves as expected for a non-machine user (aka. a human), it's because of the default behavior of the selenium driver that the problem appeared once CKE5 fixed their accessibility.
Getting around it by setting the value in the JS directly. This wouldn't have been a problem with a nightwatch test doing the same thing for example.
Comment #12
wim leersPer my MR comment, see #3316274-24: Stabilize FunctionalJavascript testing AJAX: add ::assertExpectedAjaxRequest(), where a similar change was needed, but entirely in the Drupal sphere (Drupal's AJAX system getting triggered after setting a form value), compared to this being entirely in the CKEditor 5 sphere. Basically: Selenium/Mink are not realistic 😬
Comment #14
catchCommitted/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!
There's a conflict in yarn.lock for 9.5.x so this will need a 9.5 version.
Opened a follow-up for the Mink subclass.
Comment #15
nod_Comment #16
nod_Comment #17
nod_forgot to update the tests, hang on
Comment #18
nod_Comment #19
wim leersLGTM
FYI, the #18 interdiff (which was also committed to the
10.0.xand10.1.xbranches) will be obsolete (i.e. will get reverted) in #3316816: Stabilize FunctionalJavascript testing AJAX: make ::setValue() trigger both "input" and "formUpdated" events 🤓Comment #21
catchAh didn't realise there was already a follow-up open. Committed/pushed to 10.1.x and cherry-picked back to 10.0.x and 9.5.x.
If we want to backport this to 9.4, it'll need a 9.4-specific patch too. I'm assuming we do so leaving open there for that.
Comment #22
nod_Comment #23
longwaveThe only difference between #18 and #22 is git noise and a couple of minor library differences that changed between 9.4.x and 9.5.x.
Comment #24
longwaveComment #26
catchCommitted/pushed to 9.4.x, thanks!