Skip to content

Popout title id causes close/reopen cascade #525

@koole

Description

@koole

Describe the bug

Popout windows cascade close, since the new 0.9 update. It's a bit hard to explain but the reproduction steps should make clear what the issue is.

Your Example Website or App

https://caplin.github.io/FlexLayout/demos/v0.9/demo/

Steps to Reproduce the Bug or Issue

  1. Any flexlayout app with tabEnablePopout (your online demo).
  2. Pop out two tabs into separate popout windows.
  3. Close the first popout window
  4. The other popout closes and degrades into an in-document float window, instead of staying open.

Expected behavior

The other popup stays open.

Operating System

MacOS

Browser Type?

Electron, Safari, Chrome

Additional context

I was able to resolve the issue by a single line patch: In src/view/layout/FloatingWindowContainer.tsx changing the title to just be controller.getPopoutWindowName() instead of controller.getPopoutWindowName() + " " + windowPopoutId. Because windowPopoutId is the popouts position in a list, a reordering of the popouts (by closing one for example), this causes all the dependencies to update and the effects to run again closes the popout. By changing the title to be stable these dependencies don't update anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions