Disable links on wall items when selecting (#6649)

This commit is contained in:
WithoutPants 2026-03-06 08:27:25 +11:00 committed by GitHub
parent 717f968a2c
commit 74a8f2e5d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 2 deletions

View file

@ -132,7 +132,13 @@ const GalleryWallCard: React.FC<IProps> = ({
<footer className={CLASSNAME_FOOTER}>
<Link
to={`/galleries/${gallery.id}`}
onClick={(e) => e.stopPropagation()}
onClick={(e) => {
if (selecting) {
e.preventDefault();
handleCardClick(e);
}
e.stopPropagation();
}}
>
{title && (
<TruncatedText

View file

@ -131,7 +131,16 @@ export const SceneWallItem: React.FC<
/>
<div className="lineargradient">
<footer className="wall-item-footer">
<Link to={props.photo.link} onClick={(e) => e.stopPropagation()}>
<Link
to={props.photo.link}
onClick={(e) => {
if (props.selecting) {
e.preventDefault();
handleClick(e);
}
e.stopPropagation();
}}
>
{title && (
<TruncatedText
text={title}