Skip to content

Disable SheetRoot FocusTrap while inside an iframe #1353

@Winde

Description

@Winde

When running playroom or any other app where there's a SheetRoot in an iframe, it voraciously takes the focus away from the parent app.

Example of behaviour:
https://mistica-web.vercel.app/playroom#?code=N4Igxg9gJgpiBcIA8BlAFjGAXAShCWAfADoB2ABOUgEICuWWEpACgE4CWAtgIasCeZSpSZsYAZzEBeYAAoAlOUkkKQymLQQA7ukxYZwQaqFY%2BABxjxyxEDgCCAEQCSAeQD6AGUcoAKtYA0hkbkpqwQpmKWBipBlFjsWAA2FlYg3vFJ-oExsGJgHKZxTJbW9uJ57AXsTJnRMfEwnBHkANoAugG1qgC%2BHUFdclldhsqq3jAAHliGSAD0dAwiHDz8yrM62HgEyiB%2BIFgYnOIIzSAAshAAbuxiWLwg7SCa7FD7YscAjADMAGwAHK1dIA

While sheet is open. The input of the playroom continuously loses the focus. We have a similar issue in the NOVUM CMS:
Image

Agreed solution is to disable the FocusTrap if we detect the app is running inside an iframe.

Alternative solution could be to expose disabling the FocusTrap via prop when injecting the SheetRoot in the app that uses mistica in an iframe.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions