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 jumps position when the viewport is resized #23672

Closed
vtenfys opened this issue Aug 25, 2017 · 6 comments
Closed

Modal jumps position when the viewport is resized #23672

vtenfys opened this issue Aug 25, 2017 · 6 comments
Labels

Comments

@vtenfys
Copy link

vtenfys commented Aug 25, 2017

Demo: https://jsfiddle.net/techdavid/g89ts0rs/2/

When the viewport is adjusted, the modal gets a margin applied to it, making it jump position slightly to the left (once only).

For the problem to occur, the main page content needs to overflow but not the modal. _adjustDialog() should be called when the modal opens initially so that this doesn't occur.

@Johann-S
Copy link
Member

Johann-S commented Sep 2, 2017

I'm sorry @TechDavid but I don't see any issue in your jsfiddle, maybe I don't look where I should 🤔
What should I do to see your this issue ?

I tried to resize my browser's window and check if they are a margin applied but that wasn't the case

@Johann-S Johann-S removed the css label Sep 2, 2017
@ddvorak
Copy link

ddvorak commented Sep 2, 2017

@Johann-S if you resize the view of the html output in the bottom right corner, after clicking the modal, it does hop left a little.

@vtenfys
Copy link
Author

vtenfys commented Sep 2, 2017

As @ddvorak said. For the problem to occur the preview pane needs to be small enough for the lorem ipsum text to overflow, but large enough for the entire modal to fit, and then it needs to be resized in height.

@vtenfys
Copy link
Author

vtenfys commented Sep 2, 2017

So just to clarify you can resize the preview pane in JSFiddle by dragging the bar between the CSS pane and the preview pane - sorry if you already know this! (I suppose you're more familiar with JSBin since that's what was suggested for making demos in the issue template).

@Johann-S
Copy link
Member

Johann-S commented Sep 2, 2017

Ok so it's the padding-right applied when the scrollbar appeared, that's it ?
Sorry just want to be sure I fully understand this issue 😅

@vtenfys
Copy link
Author

vtenfys commented Sep 2, 2017

Not exactly... it's the padding-right applied, but there's no scrollbar involved. Here's a video: https://www.useloom.com/share/efa1bc8aa6ce4215807bbeb830b0aa9c

DabeDotCom added a commit to DabeDotCom/bootstrap-vue that referenced this issue Oct 9, 2017
Building on bootstrap-vue#1058...  If the modal dialog's content height
changed (e.g., "v-if" conditionally displayed an error message),
the `padding-right` could be applied inconsistently.

twbs/bootstrap#23672 fixed this by calling `this.adjustDialog()`
during `onBeforeEnter()`, as well
tmorehouse pushed a commit to bootstrap-vue/bootstrap-vue that referenced this issue Oct 9, 2017
Building on #1058...  If the modal dialog's content height
changed (e.g., "v-if" conditionally displayed an error message),
the `padding-right` could be applied inconsistently.

twbs/bootstrap#23672 fixed this by calling `this.adjustDialog()`
during `onBeforeEnter()`, as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants