Answer the question
In order to leave comments, you need to log in
In iOS 13 Safari - position: fixed is not displayed correctly. Has anyone come across?
Good afternoon.
I came across an interesting bug that can only be reproduced in Safari in iOS 13.
The essence of the bug is the incorrect arrangement of elements with position: fixed;
For example, there is a layout:
<div class="modal">
<div class="modal__body">
<div>Содержимое окна</div>
<input type="text" />
</div>
<div class="modal_overlay"></div>
</div>
.modal {
display: flex;
justify-content: center;
align-items: center;
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 48px 0;
overflow: auto;
z-index: 10;
}
.modal__body {
display: flex;
flex-direction: column;
position: relative;
margin: auto;
background: #fff;
z-index: 11;
max-width: 520px;
}
.modal_overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, .4);
z-index: 10;
cursor: pointer;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question