Signed by hannaSSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
crates/web/src/issues.rs +5 −4
| @@ -482,8 +482,8 @@ pub(crate) async fn assignee_form( | |||
| 482 | 482 | ||
| 483 | 483 | /// The label editor for an existing issue/PR: a `<details>` dropdown whose toggle | |
| 484 | 484 | /// shows the applied labels as chips (JS replaces the "Select labels" text), the | |
| 485 | - | /// same control as the new-issue picker. Checking labels and pressing Apply POSTs | |
| 486 | - | /// the whole set; the button also works without JS. | |
| 485 | + | /// same control as the new-issue picker. Toggling a label auto-submits the whole | |
| 486 | + | /// set; a noscript Apply button keeps it working without JS. | |
| 487 | 487 | pub(crate) fn label_form( | |
| 488 | 488 | issue: &Issue, | |
| 489 | 489 | repo_labels: &[Label], | |
| @@ -504,12 +504,13 @@ pub(crate) fn label_form( | |||
| 504 | 504 | label class="checkbox" { | |
| 505 | 505 | input type="checkbox" name="label" value=(l.id) checked[is_on(&l.id)] | |
| 506 | 506 | data-label-name=(l.name) | |
| 507 | - | data-label-color=(css_color(&l.color)); | |
| 507 | + | data-label-color=(css_color(&l.color)) | |
| 508 | + | data-autosubmit; | |
| 508 | 509 | " " span class="label-swatch" style=(format!("--label-color: {}", css_color(&l.color))) {} | |
| 509 | 510 | " " (l.name) | |
| 510 | 511 | } | |
| 511 | 512 | } | |
| 512 | - | button class="btn btn-primary inline-btn label-apply" type="submit" { "Apply" } | |
| 513 | + | noscript { button class="btn inline-btn label-apply" type="submit" { "Apply" } } | |
| 513 | 514 | } | |
| 514 | 515 | } | |
| 515 | 516 | } | |