volto icon indicating copy to clipboard operation
volto copied to clipboard

Object Browser closes clicking on it on new context

Open nzambello opened this issue 3 years ago • 4 comments

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:

  1. Add a new page
  2. Create a text block with some text
  3. Select some text to add a link
  4. Open the object browser to retrieve a content
  5. Click on the search button
  6. Focus on the search input
  7. 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

nzambello avatar May 31 '21 10:05 nzambello

@sneridagh can this be related to https://github.com/plone/volto/pull/2389#issuecomment-830027413 ?

nzambello avatar Jun 03 '21 07:06 nzambello

I couldn't reproduce this in Chrome, but indeed it reproduces on Firefox.

avoinea avatar Jul 01 '21 09:07 avoinea

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

giuliaghisini avatar May 03 '22 09:05 giuliaghisini

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.

davisagli avatar Aug 19 '22 21:08 davisagli