jojo/templates/repo/issue
0ko d05002fbfb fix(ui): prevent JS from removing icon from close/reopen button (#9959)
Followup to https://codeberg.org/forgejo/forgejo/pulls/9598. A bug surfaced.

When typing text in, JS was updating button's `textContent`, which also affected the icon included in the button. To avoid complex rebuilding of the button element in JS I just placed the text it it's own span, `textContent` of which is now updated by JS instead of the whole button.

Preview

Normal state from template:
https://codeberg.org/attachments/f504bcc3-c1bc-4b10-96ae-e8b666c4a828
https://codeberg.org/attachments/5e72109c-04c7-49b0-ba05-e8f17c949fcb

After editing text, without the fix:
https://codeberg.org/attachments/2c61b02f-b36a-4b80-8816-98bed3fc48e0
https://codeberg.org/attachments/923d4419-97ee-48c6-b60d-9719e36ae6ff

With the fix:
https://codeberg.org/attachments/458c1f6a-549e-4ef7-8822-8529351b7bc4
https://codeberg.org/attachments/839032f7-2f4a-488a-a8a5-d3fbfc45504b

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9959
Reviewed-by: Otto <otto@codeberg.org>
2025-11-05 05:02:52 +01:00
..
fields Don't show hidden labels when filling out an issue template (#31576) 2024-07-14 10:39:08 +02:00
labels feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
milestone fix(ui): Make 'Clear milestone' work with HTMX (#8266) 2025-08-11 20:10:10 +02:00
view_content feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
card.tmpl chore: move template context (#8663) 2025-07-25 11:55:15 +02:00
choose.tmpl Fix spacing in issue navbar (#30238) 2024-04-07 15:40:31 +02:00
comment_tab.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
filter_actions.tmpl chore: move template context (#8663) 2025-07-25 11:55:15 +02:00
filter_list.tmpl fix: replace "All pull requests" in repo issue filter (#9401) 2025-09-27 17:11:45 +02:00
filters.tmpl Migrate margin and padding helpers to tailwind (#30043) 2024-03-30 07:17:29 +01:00
label_precolors.tmpl Replace 10 more gt- classes with tw- (#29945) 2024-03-26 19:04:27 +01:00
labels.tmpl Fix spacing in issue navbar (#30238) 2024-04-07 15:40:31 +02:00
list.tmpl feat(ui): implement new buttons for better cohesiveness (#9359) 2025-10-05 05:22:32 +02:00
milestone_issues.tmpl [PORT] Refactor DateUtils and merge TimeSince (gitea#32409) 2024-11-10 22:23:27 +01:00
milestone_new.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
milestones.tmpl feat: require data-modal-id for delete buttons (#8711) 2025-08-08 01:53:23 +02:00
navbar.tmpl fix(ui): correct switch ordering (#6576) 2025-01-15 19:56:17 +00:00
new.tmpl Fix incorrect redirection when creating a PR fails (#29537) 2024-03-06 12:10:45 +08:00
new_form.tmpl feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
openclose.tmpl fix(ui): use gap in switch items (#7581) 2025-04-21 04:25:08 +00:00
search.tmpl feat(ui): implement new buttons for better cohesiveness (#9359) 2025-10-05 05:22:32 +02:00
view.tmpl Make Issue/PR/projects more compact, misc CSS tweaks (#24459) 2023-05-03 17:58:59 -04:00
view_content.tmpl fix(ui): prevent JS from removing icon from close/reopen button (#9959) 2025-11-05 05:02:52 +01:00
view_title.tmpl feat(ui): Display to maintainers in PR when it is editable 2025-02-09 16:22:25 +01:00