gitforge/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
utils fix: prevent page jumps due to textarea auto resizing (#7569) 2025-10-01 03:47:19 +02:00
vendor
webcomponents chore: fix a few typos in the documentation (#9134) 2025-09-04 01:53:40 +02:00
bootstrap.js
bootstrap.test.js
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
svg.js
svg.test.js
types.d.ts feat: run tsc in CI (#9574) 2025-10-10 15:48:45 +02:00
utils.js
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