Bug 226753 - alert will trigger keyboard
Summary: alert will trigger keyboard
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: Safari 14
Hardware: iPhone / iPad iOS 14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-07 20:12 PDT by Zuckjet
Modified: 2021-06-14 20:13 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zuckjet 2021-06-07 20:12:54 PDT
I want to control clipboard content by javascript: 

```
<button id="btn">copy</button>
<script src="./index.js"></script>


var btn2 = document.getElementById('btn');
btn2.addEventListener('click', copy, false);



function copy() {
        let textArea = document.createElement("textarea");
        textArea.value = "copy content";
        document.body.appendChild(textArea);
        textArea.focus();
        textArea.select();

        document.execCommand("copy");
        alert("copy success");        // !!! this line will trigger keyboard, and make page response slowly, if i remove this line, everything is ok.
        document.body.removeChild(textArea);
}

```
Comment 1 Radar WebKit Bug Importer 2021-06-14 20:13:15 PDT
<rdar://problem/79321330>