<!DOCTYPE html>
<html>
<body>
    <input id="field" onfocus=handleFocus() value="helloworld" onbeforeinput=handleBeforeInput(event)></div>
    <script src="../../resources/dump-as-markup.js"></script>
    <script>
        Markup.description(`To manually test this, select the text in the input and attempt to cut. The value of the input should not change.`);

        var allowCut = false;
        (function() {
            if (!window.internals || !window.eventSender || !window.testRunner)
                return;

            document.querySelector("#field").focus();
        })();

        function handleBeforeInput(event)
        {
            if (allowCut)
                return;

            if (event.inputType === "deleteByCut")
                event.preventDefault();
        }

        function handleFocus()
        {
            document.querySelector("#field").select();
            Markup.dump("field", "initial value");

            testRunner.execCommand("Cut");
            Markup.dump("field", "after prevented cut");

            allowCut = true;
            testRunner.execCommand("Cut");
            Markup.dump("field", "after allowed cut");
        }
    </script>
</body>
</html>
