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

Modal dialog jumps when opened/closed #4435

Closed
1 task done
lee-chase opened this issue Oct 23, 2019 · 5 comments · Fixed by #5119
Closed
1 task done

Modal dialog jumps when opened/closed #4435

lee-chase opened this issue Oct 23, 2019 · 5 comments · Fixed by #5119

Comments

@lee-chase
Copy link
Member

The modal dialog turns off body scrolling when displayed. In the case where a scroll bar is displayed in the background (optional on Mac) the modal dialog can be seen to jump left to right on display and right to left on hide.

What package(s) are you using?

  • carbon-components

Detailed description

The modal dialog jumps which is distracting.

Modal dialog

Dialog should not jump

Chrome latest

10.7

@Carbon/Vue

Steps to reproduce the issue

  1. Ensure scroll bars are always displayed on mac.
    image
  2. yarn dev in the mono repo
  3. Show any of the modal dialogs - note the dialog jumps right as it's displayed
  4. Hide the dialog - note it jumps left as it's hidden.

NOTE: A vertical jump would also happen if a horizontal scroll bar was shown.

HINT: Replace

right: 0;
bottom: 0;

with

width: 100vw;
height: 100vh;
@hamoody-omar
Copy link

hamoody-omar commented Oct 28, 2019

Having the same issue. When the dialog opens and closes , you can't scroll up or down. the whole page kinda freezes. Any update?

@emyarod
Copy link
Member

emyarod commented Jan 14, 2020

I am not seeing the modal jump after enabling that setting in macOS, would you mind recording the issue you are describing?

@lee-chase
Copy link
Member Author

On display the removal of the scroll bar causes the page to jump and modal to drop.
On close the modal jumps left and then rises.
ModalJump

@emyarod
Copy link
Member

emyarod commented Jan 20, 2020

got it, thanks for recording with the 10% slowdown

@tw15egan
Copy link
Contributor

Somewhat related (system scroll bar issue: #5101)

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

Successfully merging a pull request may close this issue.

5 participants