Repository navigation
Commit 3661e61
committed
fix(server): preview copy keys forward only the text they copied
The copy recorder armed on every key, so text a page copied during another
key, or text a frame kept without being read, could go out with a later copy
key from a different frame. It now arms only on Ctrl or Cmd + C or X, and the
server clears every frame's text right before it sends a copy or cut key, as
well as after.
The selection is now read while the event is captured at window, so a page
copy handler that stops propagation still copies the selection. Text a page
sets with preventDefault and setData still replaces it. The focused field is
found through open shadow roots.1 parent 847a93d commit 3661e61
2 files changed
Lines changed: 44 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
| 165 | + | |
| 166 | + | |
159 | 167 | | |
160 | 168 | | |
161 | 169 | | |
| |||
274 | 282 | | |
275 | 283 | | |
276 | 284 | | |
| 285 | + | |
277 | 286 | | |
278 | 287 | | |
279 | 288 | | |
| |||
1027 | 1036 | | |
1028 | 1037 | | |
1029 | 1038 | | |
1030 | | - | |
| 1039 | + | |
1031 | 1040 | | |
1032 | 1041 | | |
1033 | 1042 | | |
1034 | 1043 | | |
1035 | 1044 | | |
1036 | 1045 | | |
1037 | 1046 | | |
1038 | | - | |
| 1047 | + | |
1039 | 1048 | | |
1040 | 1049 | | |
1041 | | - | |
1042 | | - | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
1043 | 1053 | | |
1044 | 1054 | | |
1045 | 1055 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
443 | 444 | | |
444 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
445 | 448 | | |
446 | 449 | | |
447 | 450 | | |
448 | 451 | | |
449 | 452 | | |
450 | | - | |
| 453 | + | |
| 454 | + | |
451 | 455 | | |
452 | 456 | | |
453 | 457 | | |
454 | 458 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
| 459 | + | |
459 | 460 | | |
460 | 461 | | |
461 | | - | |
462 | | - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
463 | 475 | | |
464 | 476 | | |
465 | 477 | | |
| |||
1136 | 1148 | | |
1137 | 1149 | | |
1138 | 1150 | | |
1139 | | - | |
| 1151 | + | |
1140 | 1152 | | |
1141 | 1153 | | |
1142 | 1154 | | |
| |||
2127 | 2139 | | |
2128 | 2140 | | |
2129 | 2141 | | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
2130 | 2147 | | |
2131 | 2148 | | |
2132 | 2149 | | |
| |||
2140 | 2157 | | |
2141 | 2158 | | |
2142 | 2159 | | |
2143 | | - | |
2144 | | - | |
2145 | | - | |
| 2160 | + | |
2146 | 2161 | | |
2147 | 2162 | | |
2148 | 2163 | | |
| |||
0 commit comments