Commit 4dc5945
authored
fix(web): run navigator.clipboard.write only when window has focus (#858)
When we receive clipboard update from the server and the browser window
is not in focus (for example, when the user copies some text directly on
the machine, not via the browser's VNC viewer), we got an error that
`navigator.clipboard.write` is not allowed when window is not in focus.
This PR adds a window check that the window has focus, and now
`clipboard.write` runs only when the window is in focus.1 parent a84a5c0 commit 4dc5945
File tree
1 file changed
+23
-2
lines changed- web-client/iron-remote-desktop/src
1 file changed
+23
-2
lines changedLines changed: 23 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
176 | 185 | | |
177 | 186 | | |
178 | 187 | | |
179 | 188 | | |
180 | 189 | | |
181 | | - | |
182 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
| |||
445 | 456 | | |
446 | 457 | | |
447 | 458 | | |
| 459 | + | |
| 460 | + | |
448 | 461 | | |
449 | 462 | | |
450 | 463 | | |
| |||
717 | 730 | | |
718 | 731 | | |
719 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
720 | 740 | | |
721 | 741 | | |
722 | 742 | | |
| |||
726 | 746 | | |
727 | 747 | | |
728 | 748 | | |
| 749 | + | |
729 | 750 | | |
730 | 751 | | |
731 | 752 | | |
| |||
0 commit comments