Commit 4a14d43
committed
Prevent beforeunload actions when downloading files
Previously, downloading a file would also trigger the beforeunload action and thereby remove the ACE editor or JsTree objects. Now, we prevent this by removing the `beforeunload` event listener and reinstalling it after "navigation".1 parent 809c53d commit 4a14d43
File tree
3 files changed
+19
-8
lines changed- app/assets/javascripts
- editor
3 files changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
| 431 | + | |
435 | 432 | | |
436 | 433 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 434 | + | |
441 | 435 | | |
442 | 436 | | |
443 | 437 | | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
444 | 447 | | |
445 | 448 | | |
446 | 449 | | |
| |||
853 | 856 | | |
854 | 857 | | |
855 | 858 | | |
| 859 | + | |
856 | 860 | | |
| 861 | + | |
857 | 862 | | |
858 | 863 | | |
859 | 864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | 107 | | |
107 | 108 | | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
0 commit comments