iOS 18 beta5 webview terminated

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .header {
            background-color: #fff;
            padding: .1rem .1rem;
            position: relative;
            width: 100%;
        }

        li {
            position: relative;
            line-height: .46rem;
        }

        .options {
            background-color: red;
            height: 4.8rem;
            height: 70vh;
            margin-top: -.01rem;
            max-height: 200px;
            overflow-x: hidden;
            overflow-y: auto;
            padding-bottom: .2rem;
            width: 100%;
        }

        .aaaa {
            max-width: 300px;
            max-height: 200px;
        }
    </style>

</head>

<body>

    <button id="aa_click">click</button>
    <div class="bbbbb">
        <div class="aaaa">
            <div class="header">
                <h3>reason</h3><span class="close-pop"><i></i></span>
            </div>
            <div class="options">
                <ul>
                    <li class="">
                        <p class="optionItem">aa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">bb</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">cc</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">dd</p><i></i>
                    </li>
                    <li class="selected">
                        <p class="optionItem">ee</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">ff</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">gg</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">sdf</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                    <li class="">
                        <p class="optionItem">aaa</p><i></i>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <script>
        document.getElementById("aa_click").onclick = function () {
            let a = document.getElementsByClassName("bbbbb")[0];
            let b = a.style.visibility
            if (b == 'hidden') {
                a.style.visibility = "visible";
            } else {
                a.style.visibility = "hidden";
            }
        };

    </script>
</body>

</html>

In iOS18 beta5, open this HTML with wkwebview, click the button to hide the list, and the webview will be terminated.If one of the following three conditions is triggered, the webview will not be terminated:

  1. Remove the elements in ul until the list is no longer slidable
  2. Remove the position:relative of the header element
  3. Remove the position:relative of the li element

wkwebview error:

Our engineering teams need to investigate this issue, as resolution may involve changes to Apple's software. I'd greatly appreciate it if you could open a bug report, include sample project and post the FB number here once you do. Bug Reporting: How and Why? has tips on creating your bug report.

已提交错误:FB14781503

iOS 18 beta5 webview terminated
 
 
Q