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

Layout is re-adapting to scrollbar or lack thereof upon modal dialog opening #81

Closed
vintprox opened this issue Jul 20, 2023 · 1 comment · Fixed by #82
Closed

Layout is re-adapting to scrollbar or lack thereof upon modal dialog opening #81

vintprox opened this issue Jul 20, 2023 · 1 comment · Fixed by #82
Assignees
Labels
bug Something isn't working

Comments

@vintprox
Copy link

vintprox commented Jul 20, 2023

Describe the bug

It's the common UI quirk I observe in web applications that implement image previews and dialogs. Once you're in modal mode, scrollbar vanishes, making the view shake, because scrollbar itself was an important part of layout. It reappears after closing dialog, causing layout re-render.

To Reproduce

Steps to reproduce the behavior:

  1. Click on any image in the note or trigger an "Export" dialog.
  2. Observe the scrollar on the right disappear, making the entire layout adapt to this.
  3. Close the dialog and observe scrollbar reappearing, causing reverse adaptiveness.

Expected behavior

Layout should stay intact upon dialog opening. Scrollbar probably should stay "as is" and be besides the dialog, so user doesn't mistakenly think it's a control for scrolling inside the dialog.

Screenshots or video

image
image

Desktop (please complete the following information):

  • OS: Manjaro, XFCE
  • Version: anytype-bin 0.33.3-1 (AUR)

Additional context

This must be happening because you're setting overflow-y: hidden on an entire document (body), causing scrollbar to disappear when dialog needs to be put before a user, to avoid scrolling on the "back layer". While we're at it, a new problem might present itself if the dialog itself doesn't have scroll behavior: content might overflow and not be seen in its entirety by the user.

I'm not entirely sure if it's even a good idea to apply a global scrollbar, when such desktop SPA can simply make a scrollbar inside the designated area, the note itself. But I understand it's because of accessibility reasons. It's just a bit perplexing to see this scrollbar start in the area which should be dedicated to the top menu. But, I suppose, it's worth a separate ticket.

@vintprox vintprox added the bug Something isn't working label Jul 20, 2023
@ra3orblade
Copy link
Contributor

#82

@ra3orblade ra3orblade linked a pull request Jul 20, 2023 that will close 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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants