Bootstrap 3 modal with long form on iPhone doesn't scroll if you touch input field

后端 未结 1 697
闹比i
闹比i 2021-01-04 13:03

I\'m using Bootstrap 3 and I have a long form that users will need to scroll to get to all of the fields. What is happening is if you touch an input field to start your scro

相关标签:
1条回答
  • 2021-01-04 13:38

    I fixed a very similar issue where the occasionally on iPhone, the background scrolls rather than the modal. Try disabling webkit smooth scrolling on the modal, and disabling all scrolling on the body when a modal is open

    body.modal-open {
        position: fixed;
        overflow: hidden;
        left:0;
        right:0;
    }
    .modal{
        -webkit-overflow-scrolling: auto;
    }
    
    0 讨论(0)
提交回复
热议问题