Problem/Motivation
After updating Drupal 10 site from version 10.0.11 to 10.2.1 , getting drupal ajax error on adding media, blocks from layout builder. Also quick edit links are disappeared from blocks ,menus etc
Steps to reproduce
I checked on Drupal 10.2.2
- Open layout builder page (as
/node/xxxx/layout
) - Enabled browsder debug tool
- When mouse-over to block, pencil icon is showed at right
- Click the pencil icon, click the delete option, then check the console, below error occured
An error occurred during the execution of the Ajax response: TypeError: Cannot read properties of undefined (reading 'style')
- And right pane showed the opition button about `delete` or `cancel`, push the `cancel` button
- After that, then check the console, below error occured
Uncaught TypeError: Cannot read properties of undefined (reading `style`)
- And click the pencil icon click the delete option again, the right pane is not showed unless you reload the page
Proposed resolution
The reason why this error is in off-canvas.js, because the style property is not exsisted in jQuery type.
https://git.drupalcode.org/project/drupal/-/blob/6a43b511df9e26aa5abf0d1...
- To change the type of $mainCanvasWrapper to NodeListOf and handle when the element is undefined. (I understand the refactor of jQuery css() to use Vanilla (native) that is good things.)
- Or Revert https://git.drupalcode.org/project/drupal/-/commit/6a43b511df9e26aa5abf0...
Remaining tasks
Nothing
User interface changes
Nothing
API changes
Nothing
Data model changes
Nothing