Files
wekan/client/components/main
Lauri Ojansivu 0495b8729d Copying a code block in a card description no longer opens a new tab.
The copy button of a code block is an <a href="#"> inside the card viewer.
Its own listener copied the text and prevented the navigation, but the click
went on to the viewer's 'click a' handler, which opens every link it sees in
a new tab - here this page plus "#". The button now stops the click, and the
viewer handler leaves the copy button alone and no longer opens a link to a
place on the page ("#", "#section") in a new tab; it moves to the target in
place when there is one.

tests/copyCodeBlock.test.cjs pins both and their order before window.open;
tests/playwright/specs/viewer-copy-code.e2e.js clicks the button and checks
that no tab opens, the page stays and the block's text is copied.

Thanks to carl-unique and xet7 !

Fixes #6753.
2026-10-10 01:20:53 +03:00
..
2026-08-25 15:40:39 +03:00
2026-08-18 21:44:45 +03:00
2021-06-11 13:34:33 +02:00
2021-06-11 13:34:33 +02:00
2021-06-11 13:34:33 +02:00
2021-06-11 13:34:33 +02:00
2021-06-11 13:34:33 +02:00