Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Commit

Permalink
stop propagation on click event inside cards
Browse files Browse the repository at this point in the history
  • Loading branch information
eramdam committed Nov 1, 2021
1 parent 30f1c2b commit b061c3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/features/renderCardsInColumnsNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const allowedCardNames = [
];

export const maybeRenderCardsInColumnsNatively = makeBTDModule((options) => {
const {mR, settings, TD} = options;
const {mR, settings, TD, jq} = options;

if (!settings.showCardsInsideColumns) {
return;
Expand Down Expand Up @@ -100,4 +100,7 @@ export const maybeRenderCardsInColumnsNatively = makeBTDModule((options) => {
};

featureFlagModule.setValueForFeatureFlag('tweetdeck_horizon_web_cards_enabled', allowedCardNames);
jq(document).on('click', 'article .js-card-container [data-testid="card"]', (ev) => {
ev.stopPropagation();
});
});

0 comments on commit b061c3a

Please sign in to comment.