Problem/Motivation
This regression is a result of #3296098: Removal :tabbable usage in dialog.js
Styling and javascript that relies on a CSS selector is broken on the Media Library CKEditor widget. This is because the class media-library-widget-modal is missing on the dialog container element.
While this change was also applied to Drupal 10.3.x it seems to only effect Drupal 11. I'm guessing whatever consumes that config file changed in a way that broke it.
The code change: https://git.drupalcode.org/project/drupal/-/commit/94bfd9fa39f244877b320...
If I revert this changed line in ckeditor5.ckeditor5.yml back to the following then the class is injected properly again.
dialogClass: media-library-widget-modal
Steps to reproduce
Drupal 11, go to a CKEditor input with the Embed Media plugin enabled. Click the Add Media button.
- Expected: the modal should take most of the viewport size
- Actual: the modal is reduced in size, unusable

Proposed resolution
#3296098: Removal :tabbable usage in dialog.js was committed to 10.3.x and 11.x but their commit differs, mainly in OpenDialogCommand::__construct where the issue lies in 11.x, because if $dialog_options['dialogClass'] is set (it is via ckeditor5.js), then $dialog_options['classes']['ui-dialog'] is not taken into account.
Fix it so both are taken into account/preserved + update ckeditor5.js to use ui-dialog since dialogClass is now deprecated.
Remaining tasks
Commit fix to 11.x and 10.3.x ?
User interface changes
Fixes media modal size.
Introduced terminology
None
API changes
None
Data model changes
None
Release notes snippet
None
| Comment | File | Size | Author |
|---|---|---|---|
| #43 | 3474018-43-11.x.patch | 9.07 KB | joegraduate |
| #42 | 3474018-11.2.5.patch | 9.24 KB | andre.bonon |
| #40 | Screenshot 2025-09-15 at 2.34.35 PM.png | 131.93 KB | smustgrave |
| #40 | Screenshot 2025-09-15 at 2.33.54 PM.png | 108.79 KB | smustgrave |
Issue fork drupal-3474018
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:
- 3474018-regression-class-is
changes, plain diff MR !10595
- 3474018-alt
changes, plain diff MR !12597
Comments
Comment #2
sourav_paulI've tested it on D11.0.1 using the mentioned steps.
verified that the class "media-library-widget-modal" is attached.
Sharing SS for reference:
Comment #3
rhovlandHmm I wonder what is different then? I ran into this with a fresh install of Drupal 11 using the recommended composer template. I installed the umami profile. I also switched to Olivero in case there was something theme specific going on there.
On my actual production site which is on Drupal 10.3.x, PHP 8.1 where the code change had already taken place I don't experience this bug. I assumed that the problem surfaces on 11 due to removal of things but maybe not?
Did you test this on a new install or an existing site?
Comment #4
sourav_paulI tested it on new D11 instance.
Comment #5
sourav_paul@rhovland have you retested the issue?
Comment #6
rhovlandI just tested it again with a new install from the composer recommended template. This time using the standard profile. Enabled the media module, added the embed media button to the basic text format.
Created a new basic page. Clicked the add media button. Class
media-library-widget-modalis missing.Checked both Chromium and Firefox.
Server:
Linux drupal11-test 5.15.0-125-generic #135~20.04.1-Ubuntu SMP Mon Oct 7 13:56:22 UTC 2024 x86_64
Nginx with PHP-FPM
PHP Version 8.3.11
Comment #7
keiserjb commentedI had found another issue talking about this. I had noticed on my Drupal 11 site that the media library modal was narrower than in Drupal 10. I then found the missing class.
https://www.drupal.org/project/drupal/issues/3473586
Comment #8
keiserjb commentedChanging the line in ckeditor5.ckeditor5.yml certainly fixes the problem.
Comment #9
rhovlandLooks like this affects other users as well but only some of them.
Comment #12
mckinzie25 commentedThis is a patch applying the change suggested in the original ticket. It restores the line
to ckeditor5.ckeditor5.yml.
Comment #13
rmpereira commentedThanks for the patch, it works for me on Drupal 11.1.1.
Comment #14
skymen commentedAlso works for me on Drupal 11.1.1. Thanks!
Comment #15
kushagra.goyal commentedYes, MR changes are working correctly. Moving to review..
Comment #16
smustgrave commentedWill need test coverage as a bug.
Comment #17
dhirendra.mishra commentedPatch is working for me as well. but not sure why class - ui-dialog-narrow is added here when used in ckeditor
while using media field out of ckeditor does not have this class ? do we also want to remove this class ? if no then may i know what is the use of this ?
Comment #18
catchWe don't have visual regression testing in core so I'm not sure how we'd add test coverage for this, tagging for manual testing though.
Comment #19
smustgrave commentedWe can't add a test to verify the existence of a class?
Comment #20
smustgrave commentedSeems to be consistently having a test failure though.
Comment #21
herved commentedI can confirm the issue as I stumbled on this after upgrading to D11.
It's very easy to reproduce with demo_umami profile and opening the add media modal from ckeditor.
I just did a git bisect on the 11.x branch and
66c3914d39bf24d828ec8516389d7cadad52294e is the first bad commit and indeed comes from #3296098: Removal :tabbable usage in dialog.js
Comment #25
nicxvan commentedComment #26
herved commentedCreated new MR, the actual fix is in
OpenDialogCommand::__construct- #3296098: Removal :tabbable usage in dialog.js was committed to 10.3.x and 11.x but their commit differs, mainly in
OpenDialogCommand::__constructwhere the issue lies in 11.x, because if$dialog_options['dialogClass']is set (it is via ckeditor5.js), then$dialog_options['classes']['ui-dialog']is not taken into account.- this MR contains improvements in order to ensure both
$dialog_options['classes']['ui-dialog']and$dialog_options['dialogClass']are taken into account/preserved.- 10.3.x is not affected by this bug per-se because it does preserve
$dialog_options['classes']['ui-dialog'], however it could (should IMO) be ported as well, for consistency.- I took the opportunity to align the way this is handled in OpenDialogCommand and OpenOffCanvasDialogCommand
- Added some regression tests for those + test to ensure the
media-library-widget-modalclass is present on the ckeditor media library modal.Comment #27
herved commentedCurrent MR snapshot, for composer.
Comment #28
smustgrave commentedIS appears to need some love
Comment #29
laura.gatesThanks @herved for grabbing the latest MR snapshot. Confirmed that this applies correctly in Core 11.1.8
Comment #30
rondog469 commentedNoting that this fixed and applied cleanly to 11.2.3. Thank you very much
Comment #31
herved commentedComment #32
herved commentedComment #33
herved commentedComment #35
herved commentedComment #36
smustgrave commentedLeft some small comments
Cleaning up tags
Test-only feature was ran here https://git.drupalcode.org/issue/drupal-3474018/-/jobs/5763875 so removing that tag.
Summary is updated so removing that tag as well.
Comment #37
herved commentedComment #38
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #39
herved commentedMR rebased
Comment #40
smustgrave commentedBefore
Without the MR this is what I see
After applying
So removing the Needs manual tag.
Most of the feedback appears to be addressed, left 1 thread open. But the issue appears to be fixed.
Comment #42
andre.bononAttaching a patch that works with 11.2.5
Comment #43
joegraduateAttaching current MR !12597 diff as static patch usable with 11.3.x.
Comment #44
mullzk commentedHi everyone.
This issue is RTBC since two months. Four Drupal-Versions 11.2.5-11.2.8 has since been released, without the MR being merged. Our customers still see the same small modal as smustgrave described in #40
May I ask what keeps this Issue from being resolved, and wether there is anything I can help?
Comment #45
siramsay commentedI've used the patch from #42 on 11.2.7/8 and it works.
@mullzk if you can, use one of the patches with composer install, reach out if you need help.
Comment #50
nod_Committed 462ac97 and pushed to 11.x. Thanks!
Committed 935757d and pushed to 11.3.x. Thanks!
Comment #53
karolus commentedJust upgraded one project to 11.2.9 last week from 10.3.x, and am seeing this. Was there some type of regression, or will this be resolved in 11.3.0?
Comment #54
nicxvan commentedSee comment 48, this was fixed in 11.3