forgejo/web_src/js
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
..
components fix: don't show ConEmu OSC escape sequences (#9875) 2025-10-31 07:24:23 +01:00
features fix(ui): prevent JS from removing icon from close/reopen button (#9959) 2025-11-05 05:02:52 +01:00
markup fix: Fix invisible iframes with RENDER_CONTENT_MODE=iframe (#8378) 2025-09-06 16:23:01 +02:00
modules feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00
render fix: don't show ConEmu OSC escape sequences (#9875) 2025-10-31 07:24:23 +01:00
standalone [CHORE] Proper chunking for swagger 2024-08-22 15:48:05 +02:00
utils fix: prevent page jumps due to textarea auto resizing (#7569) 2025-10-01 03:47:19 +02:00
vendor Vendor jquery.are-you-sure with strict mode fixes (#26901) 2023-09-06 00:02:44 +00:00
webcomponents chore: fix a few typos in the documentation (#9134) 2025-09-04 01:53:40 +02:00
bootstrap.js Suppress Monaco JavaScript errors in Safari (#3805) 2024-05-18 21:07:09 +00:00
bootstrap.test.js Avoid duplicate JS error messages on UI (#28873) 2024-01-21 14:23:08 +00:00
emoji.test.js chore: add javascript unit test 2025-08-10 23:11:39 +02:00
htmx.js Update dependency htmx.org to v2 (forgejo) (#8342) 2025-06-29 13:52:24 +02:00
index.js feat: convert create/rename branch and create tag to native dialog (#9760) 2025-10-30 21:06:14 +01:00
jquery.js Forbid variables containing jQuery collections not having the $ prefix (#29839) 2024-03-20 08:46:30 +01:00
svg.js Reimplement editor Tab handling with accessibility safeguards (#6813) 2025-05-25 19:17:03 +02:00
svg.test.js Remove "class-name" from svg icon (#33540) 2025-02-25 12:56:30 +01:00
types.d.ts feat: run tsc in CI (#9574) 2025-10-10 15:48:45 +02:00
utils.js chore: add new lint rules 2024-10-23 08:10:18 +02:00
utils.test.js chore(ci): testSleep: show actual times on failures (#8271) 2025-06-25 15:58:55 +02:00
vitest.setup.js feat: replace cross origin protection (#9830) 2025-10-29 22:43:22 +01:00