Commit f571734
Stop the history panel buttons from submitting their forms
Both buttons sit in a form and carry no type, so they default to submit.
They only avoid navigating because history.js calls preventDefault, and
that script loads with the panel, so a click landing first sends the
browser to the raw JSON of the sidebar or refresh view. The toolbar is
then gone from the page, which is what the switch test hit on CI.
The forms are read by ajaxForm rather than submitted, so nothing needs
the submit behaviour. Clicking early is now a no-op instead, so the test
retries the click until the switch takes effect.1 parent b63f4fa commit f571734
4 files changed
Lines changed: 20 additions & 4 deletions
File tree
- debug_toolbar/templates/debug_toolbar/panels
- docs
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
791 | | - | |
792 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
793 | 795 | | |
794 | 796 | | |
795 | 797 | | |
796 | 798 | | |
797 | 799 | | |
798 | 800 | | |
| 801 | + | |
799 | 802 | | |
800 | | - | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
801 | 815 | | |
802 | 816 | | |
803 | 817 | | |
| |||
0 commit comments