Bug 226753
| Summary: | alert will trigger keyboard | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Zuckjet <zuckjet> |
| Component: | UI Events | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | ap, webkit-bug-importer, wenson_hsieh, zuckjet |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 14 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 14 | ||
Zuckjet
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);
}
```
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/79321330>