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

Content with spacer jumps when blurring and focusing the page #395

Closed
revolter opened this issue Mar 27, 2021 · 1 comment · Fixed by #410
Closed

Content with spacer jumps when blurring and focusing the page #395

revolter opened this issue Mar 27, 2021 · 1 comment · Fixed by #410
Assignees
Labels
bug Something isn't working

Comments

@revolter
Copy link

Describe the bug

When using a combination of ZStack, VStack and Spacer, some views jump when changing to another tab and back again.

To Reproduce
Steps to reproduce the behavior:

  1. Download the attached project
  2. Run carton dev
  3. Open the webpage
  4. Select another tab
  5. Select the initial tab

Expected behavior

The text should remain outside the rectangle.

Screenshots
If this is a layout/rendering issue, please provide screenshots for both Tokamak and SwiftUI that highlight the difference.

Desktop (please complete the following information):

  • OS: macOS Big Sur 11.2.3 (20D91)
  • Browser: Safari
  • Version of the browser: 14.0.3 (16610.4.3.1.7)
  • Version of Tokamak: 0.6.1

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version of the browser [e.g. 22]
  • Version of Tokamak [e.g. 0.6.1]

Additional context

1616847509.zip

@revolter revolter added the bug Something isn't working label Mar 27, 2021
@MaxDesiatov
Copy link
Collaborator

MaxDesiatov commented Apr 1, 2021

Thanks for the detailed report and sorry for the delayed reply! I assume that we can fix this by our layout code rewrite in #379, but there may be an easier fix. Unfortunately, I don't have an estimate for when I'll be able to investigate this in a detailed way. In the meantime, I'm happy to review PRs from other co-maintainers or contributors that fix this .

@MaxDesiatov MaxDesiatov linked a pull request Jun 15, 2021 that will close this issue
MaxDesiatov pushed a commit that referenced this issue Jun 15, 2021
`DOMRenderer.mount` contains code which can be necessary to properly render spacers. However, `update` can overwrite what this code does, leading to the problem described in #395.

This PR modifies `update` to fix this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants