Problem/Motivation
Same issue as #3489038: Mercury tray resizes when modal dialogs are opened, but I think we are seeing the problem now when the sidebar opens a modal dialog.
Steps to reproduce
- Add node using mercury editor with an entity reference field that uses an entity browser
- Attempt to open the entity browser via the sidebar
- Confirm the sidebar is now full screen. (see below)
Proposed resolution
Fix JS
Remaining tasks
TBD
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ezgif-3-40b4f61e55.gif | 403.01 KB | jrockowitz |
Issue fork mercury_editor-3489991
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:

Comments
Comment #2
jrockowitz commentedComment #3
jrockowitz commentedMarking this critical because the mercury editor remains locked in the full-width mode even after reloading the page.
Comment #5
sethhill commentedDialogs should be behaving quite a bit better now.
I also moved some of the handlers around on resizing the sidebar tray, so that should better detect when the sidebar is open or closed. There is still one bug where if you collapse the sidebar and then start dragging it back open, it flies open to the width before it was collapsed. I thought it better to leave that as it stands currently and get more eyes on this sooner.
I believe this is undocumented at the moment, but you can configure dialog settings based on specific Paragraph types. This is found in Mercury Editor Dialog Settings. To do so, create a new object with the Paragraph's name appended with _form. For example:
Comment #7
sethhill commentedI made some modifications to improve the experience of resizing the sidebar tray.
When collapsing and re-opening the tray using the button in the toolbar, the tray will now open at the default width. This makes the default width setting more relevant, because it's now possible to restore the tray to that default.
Resolved the issue where the tray popped open unexpectedly to a previously-stored value.
I think this is ready to merge if it looks good to others.
Comment #8
jrockowitz commentedI tested the MR, and it fixes the reported issue.
Comment #10
sethhill commented