volto
volto copied to clipboard
Object Browser closes clicking on it on new context
Describe the bug When you edit new content (a Page), so in a new Plone context, if you try to use the Object Browser for a link, clicking two times on the Sidebar (everywhere) will close the ObjectBrowser. My issue started for the inability to search for a content: first click on the search (lens) icon button, then focusing on the search input was causing the sidebar to close. Then I saw that it was triggered by the clicks, anywhere in the sidebar.
It doesn't happen on an existing content.
To Reproduce Steps to reproduce the behavior:
- Add a new page
- Create a text block with some text
- Select some text to add a link
- Open the object browser to retrieve a content
- Click on the search button
- Focus on the search input
- The sidebar will close
Expected behavior It shouldn't close
Screenshots
https://user-images.githubusercontent.com/21101435/120179092-7434a200-c20a-11eb-961d-40cdeb6d266c.mov
Software (please complete the following information):
- OS: any
- Browser: Chrome, Firefox
- Volto Version: 12.14.0 -> 13 (master) for sure
- Plone Version: 5.2.4
- Plone REST API Version: 7.3.1
@sneridagh can this be related to https://github.com/plone/volto/pull/2389#issuecomment-830027413 ?
I couldn't reproduce this in Chrome, but indeed it reproduces on Firefox.
I cannot reproduce this in Chrome neither in Firefox. I think this is fixed and there's nothing more to do. There was a pr, https://github.com/plone/volto/pull/2509.
@sneridagh @tiberiuichim @avoinea
fwiw, I saw behavior similar to this in a case where I was accidentally using withObjectBrowser to wrap 2 different components. So there were two different SidebarPopup components listening for mouse clicks, and the click could be inside one but outside the other.