How to prevent of automatic centering of webpage in IOS/Safary when an input element focus is enabled

An OTP input form was created using HTML/CSS/JS, which includes six input fields. It functions as expected, but when tested on iOS devices, it was observed that the page automatically centers around the input field that is in focus. This isn’t the desired behavior, and there’s a need to disable this automatic centering for input fields. Is there a way to achieve this on iOS?

css code below:

    #inputContainer{
        padding:0px;
        display: flex;
        font-size:28px;
        margin:auto;
        width: 216px; 
        height: 44;
    }
    
    #inputContainer input{
        margin: 0px 2px 0px 2px;
        display: inline-flex;
        border: 1px solid rgba(156, 150, 127, 0.24);
        width: 32px;
        height: 44px;
        border-radius: 8px;
        text-align: center;
        font-size:28px;
        caret-color: transparent;
    }
    
    #inputContainer input:nth-child(1){
        border: 1px solid rgba(255, 212, 3, 1);
    }
    
    #inputContainer input:focus { 
        outline: none;
    }
    
    #inputContainer input[disabled] { 
        color: black;
    }

js code below:

const inactiveInputBorderColor = "1px solid rgba(156, 150, 127, 0.24)";
            const activeInputBorderColor = "2px solid rgba(255, 212, 3, 1)";
            const hoverInputBorderColor = "1px solid rgba(255, 212, 3, 1)";
            const inactiveBoxShadow = "none";
            const activeBoxShadow = "0 0 0 3px rgba(255, 154, 3, 0.15)";
            const inputs = document.querySelectorAll("#inputContainer input");
            
                        
            inputs.forEach((input, index) => {
                input.dataset.index = index;

                input.addEventListener("click", customClickInput);
                input.addEventListener("paste", customPastOtp);
                input.addEventListener("mouseenter", customEnterHover);
                input.addEventListener("mouseleave", customLeaveHover);
                input.addEventListener("keyup", customEnterAndRemoveOtp);
            });
            
            function submitOtp(){
                let otp = "";
                
                setTimeout(function() {
                    inputs.forEach((input) => {
                        otp += input.value;
                        input.disabled = true;
                        input.classList.add("disabled");
                    });
                }, 5000);

            }
            
            function customPastOtp(e){
                const data = e.clipboardData.getData("text");
                const value = data.split("");
                if(value.length === inputs.length){
                                        
                    inputs.forEach((input, index) => {
                        input.disabled = true;
                        input.value = value[index];
                        input.style.border = inactiveInputBorderColor;
                        input.style.boxShadow = inactiveBoxShadow;
                    });
                    submitOtp();
                } else if(value.length < inputs.length) {
                    
                    inputs.forEach((input, index) => {
                        if(index  < value.length){
                            input.disabled = true;
                            input.value = value[index];
                            input.style.border = inactiveInputBorderColor;
                            input.style.boxShadow = inactiveBoxShadow;
                        } else if(index === value.length){
                            console.log(index);
                            input.style.boxShadow = activeBoxShadow;
                            input.style.border = activeInputBorderColor;
                            input.focus();
                        }
                    });
                    submitOtp();
                }
                e.preventDefault();
            };
            
            function customEnterAndRemoveOtp(e){
                const input = e.target;
                let value = input.value;
                
                if(value.length === inputs.length){
                    inputs.forEach((input, index) => {input.value = value[index];});
                    submitOtp();
                }else if( 1 < value.length && value.length < inputs.length){
                    inputs.forEach((input, index) => {
                        if(index  < value.length){
                            input.disabled = true;
                            input.value = value[index];
                            input.style.border = inactiveInputBorderColor;
                            input.style.boxShadow = inactiveBoxShadow;
                        } else if(index === value.length){
                            console.log(index);
                            input.style.boxShadow = activeBoxShadow;
                            input.style.border = activeInputBorderColor;
                            input.focus();
                        }
                    });
                }else{
                    input.value = "";
                    input.value = value ? value[0] : "";                    
                    let fieldIndex = input.dataset.index;
                    
                    if(value.length > 0 && fieldIndex < inputs.length - 1){
                        input.style.border = inactiveInputBorderColor;
                        input.style.boxShadow = inactiveBoxShadow;
                        input.disabled = true;
                        input.nextElementSibling.style.boxShadow = activeBoxShadow;
                        input.nextElementSibling.style.border = activeInputBorderColor;
                        input.nextElementSibling.focus();
                    }else if(value.length > 0 && fieldIndex == inputs.length - 1){
                        input.style.border = inactiveInputBorderColor;
                        input.style.boxShadow = inactiveBoxShadow;
                        submitOtp();
                    }   
                    
                    if (e.key === "Backspace" && fieldIndex > 0){
                        input.style.border = inactiveInputBorderColor;
                        input.style.boxShadow = inactiveBoxShadow;
                        input.previousElementSibling.disabled = false;
                        input.previousElementSibling.style.boxShadow = activeBoxShadow;
                        input.previousElementSibling.style.border = activeInputBorderColor;
                        input.previousElementSibling.value = "";
                        input.previousElementSibling.focus();
                    } else if(e.key === "Delete" && fieldIndex > 0){
                        input.style.border = inactiveInputBorderColor;
                        input.style.boxShadow = inactiveBoxShadow;
                        input.previousElementSibling.disabled = false;
                        input.previousElementSibling.style.boxShadow = activeBoxShadow;
                        input.previousElementSibling.style.border = activeInputBorderColor;
                        input.previousElementSibling.value = "";
                        input.previousElementSibling.focus();
                    }
                }
            }
            
            function customClickInput(e){
                let valueFlag = 0;
                
                inputs.forEach((input) => {
                    if(valueFlag === 0 && input.value == ""){
                        input.removeEventListener("mouseenter", customEnterHover);
                        input.removeEventListener("mouseleave", customLeaveHover);
                        input.style.border = activeInputBorderColor;
                        input.style.boxShadow = activeBoxShadow;
                        input.focus();
                        valueFlag++;
                    }else{
                        input.removeEventListener("mouseenter", customEnterHover);
                        input.removeEventListener("mouseleave", customLeaveHover);
                        input.style.border = inactiveInputBorderColor; 
                        input.style.boxShadow = inactiveBoxShadow;
                    }
                }); 
            }
            
            function customEnterHover(e){
                const input = e.target;
                let fieldIndex = input.dataset.index;
                
                inputs.forEach((input) => {
                    if(input.dataset.index === fieldIndex){
                        input.style.border = hoverInputBorderColor; 
                        input.style.boxShadow = inactiveBoxShadow;
                    }else{
                        input.style.border = inactiveInputBorderColor;
                        input.style.boxShadow = inactiveBoxShadow;
                    }
                });
            }
            
            function customLeaveHover(e){
                const input = e.target;
                let fieldIndex = input.dataset.index;
                
                inputs.forEach((input) => {
                    input.style.border = inactiveInputBorderColor;
                    input.style.boxShadow = inactiveBoxShadow;      
                });
            }
            
            window.onload = function() {
                document.querySelector("#inputContainer input:nth-child(1)").focus();
                console.log("focused");
            };

html code below:

<body>
    <div id="inputContainer">
        <input type="text" pattern="[0-9]*" inputmode="numeric" maxlength="6" autocomplete="off">
        <input type="text" pattern="[0-9]*" inputmode="numeric" maxlength="1" autocomplete="off">
        <input type="text" pattern="[0-9]*" inputmode="numeric" maxlength="1" autocomplete="off">
        <input type="text" pattern="[0-9]*" inputmode="numeric" maxlength="1" autocomplete="off">
        <input type="text" pattern="[0-9]*" inputmode="numeric" maxlength="1" autocomplete="off">
        <input type="text" pattern="[0-9]*" inputmode="numeric" maxlength="1" autocomplete="off">
    </div>
</body>

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật