plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
427 stars 575 forks source link

Ensure that sidebar field will not steal focus when metadata is edited 17.x.x backport #5982

Closed dobri1408 closed 1 week ago

dobri1408 commented 1 week ago

When editing metadata externally, as in the case of our EEA metadata block, the current functionality causes the sidebar to automatically gain focus. However, this behavior is unnecessary in this context and results in the sidebar capturing focus inappropriately. To address this, I propose a solution where the sidebar will only receive focus if the user is actively working within it. This can be achieved by checking the activeElement to determine if the sidebar should be focused.

screen-capture.webm

ichim-david commented 1 week ago

Closing this pull request for now, the backport is always done after the main work went through the review process and the work was merged.