Problem/Motivation

Discovered while working on #3206522: Add FunctionalJavascript test coverage for media library.

Steps to reproduce

Override alt for some <drupal-media>
I expect this to trigger a XHR to in the preview show the updated alt

But this does not happen.

I already spent ~45 mins debugging this and searching the CKEditor 5 docs, unsuccessfully. The editingDowncast in drupalmediatoolbar.js is supposed to be invoked whenever the model is changed, but that is definitely not happening.

Perhaps this means that we're setting the model attributes incorrectly?

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

Wim Leers created an issue. See original summary.

wim leers’s picture

Title: Media previews do not update after alt text was modified » [drupalMedia] Media previews do not update after alt text was modified
Issue tags: +Usability, +Needs tests, +JavaScript
wim leers’s picture

Project: CKEditor 5 » Drupal core
Version: 1.0.x-dev » 9.3.x-dev
Component: Code » ckeditor5.module

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

wim leers’s picture

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)
lauriii’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

This was fixed by #3262492: Refactor isMediaUrl to more generic API that supplies frontend metadata about media entities and there's test coverage in \Drupal\Tests\ckeditor5\FunctionalJavascript\MediaTest::testAlt.