E
E
Evgeny Pashkov2021-07-13 10:22:50
JavaScript
Evgeny Pashkov, 2021-07-13 10:22:50

How to remove button jumps when opening modal on Bootstrap-5?

Hello. Tell me how to remove the button jumps in the header which is set as fixed-top when opening the modal. I have my own scroll-bar with my own styles and all that. When opening a modal or Offcanvas on bootstrap-5, the body is set to padding-right: 10px; I can disable it, but then everything is stretched when the modal is opened. Maybe someone has already fixed such a jamb?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey delphinpro, 2021-07-13
@delphinpro

Listen to modal open event and manually add padding right to all blocks in fixed position stretched to full width (similar to buddy)
Keep in mind that padding doesn't have to be fixed. This is the width of the scrollbar that needs to be calculated programmatically.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question