(e, isCut)
| 2102 | }; |
| 2103 | |
| 2104 | var doCopy = function(e, isCut) { |
| 2105 | var data = host.getCopyText(); |
| 2106 | if (!data) |
| 2107 | return event.preventDefault(e); |
| 2108 | |
| 2109 | if (handleClipboardData(e, data)) { |
| 2110 | isCut ? host.onCut() : host.onCopy(); |
| 2111 | event.preventDefault(e); |
| 2112 | } else { |
| 2113 | copied = true; |
| 2114 | text.value = data; |
| 2115 | text.select(); |
| 2116 | setTimeout(function(){ |
| 2117 | copied = false; |
| 2118 | resetValue(); |
| 2119 | resetSelection(); |
| 2120 | isCut ? host.onCut() : host.onCopy(); |
| 2121 | }); |
| 2122 | } |
| 2123 | }; |
| 2124 | |
| 2125 | var onCut = function(e) { |
| 2126 | doCopy(e, true); |
no test coverage detected