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

Sheet modal doesn't respect closeByBackdropClick=false #3949

Closed
jacobg opened this issue Oct 22, 2021 · 2 comments
Closed

Sheet modal doesn't respect closeByBackdropClick=false #3949

jacobg opened this issue Oct 22, 2021 · 2 comments

Comments

@jacobg
Copy link

jacobg commented Oct 22, 2021

Describe the bug

Sheet Modal with backdrop enabled and closeByBackdropClick disabled is still closing when clicking backdrop.

To Reproduce

Steps to reproduce the behavior:
Check out the Swipe To Close example at:
https://framework7.io/docs/sheet-modal.html#examples

Expected behavior

Modal shouldn't close.

Actual Behavior

Modal closing

@nolimits4web
Copy link
Member

No, I can't replicate it. This example https://framework7.io/docs/sheet-modal.html#examples doesn't have closeByBackdropClick: false so it works correctly. Would be good to see example that illustrates the issue

@jacobg
Copy link
Author

jacobg commented Oct 27, 2021

Here is a sandbox example:
https://codesandbox.io/s/framework7-vue-sheet-dynamic-close-by-backdrop-click-905tq?file=/src/pages/Home.vue

It looks like the bug is that if close-by-backdrop-click is mounted as true, but then later changes to false, then f7 doesn't use the updated bound variable. This example simulates the use-case of some work in progress (e.g., network call), and we don't want the sheet to close.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants