Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong diagram palette position when multiple diagrams are open (in a portal) #3030

Closed
pcdavid opened this issue Jan 29, 2024 · 2 comments · Fixed by #3060
Closed

Wrong diagram palette position when multiple diagrams are open (in a portal) #3030

pcdavid opened this issue Jan 29, 2024 · 2 comments · Fixed by #3060

Comments

@pcdavid
Copy link
Member

pcdavid commented Jan 29, 2024

Steps to reproduce:

  1. Create a portal
  2. Place 2 Topography diagrams beside each other in the portal
  3. Click on the background of the diagram on the left
  4. The palette opens in the second diagram

See the video below:

Capture.video.du.2024-01-29.10-38-28.webm
@pcdavid
Copy link
Member Author

pcdavid commented Feb 5, 2024

I think this is caused by:

const wrapperRef = document.querySelector('.react-flow');

in PalettePortal.tsx, which assumes there is a single .react-flow element visible at a time.

When N diagrams are visible at the same time, document.querySelectorAll('.react-flow') returns N elements, but we use querySelector and get whichever is the first one returned.

@pcdavid
Copy link
Member Author

pcdavid commented Feb 5, 2024

Note that in DiagramRenderer.tsx we already get the actual React.Ref<HTMLDivElement> we need.

pcdavid added a commit that referenced this issue Feb 5, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@pcdavid pcdavid linked a pull request Feb 5, 2024 that will close this issue
pcdavid added a commit that referenced this issue Feb 5, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@pcdavid pcdavid self-assigned this Feb 5, 2024
pcdavid added a commit that referenced this issue Feb 6, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Feb 6, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Feb 6, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Feb 6, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Feb 6, 2024
Bug: #3030
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant