Skip to content

Commit

Permalink
fix: card banner images should not be draggable (toeverything#6098)
Browse files Browse the repository at this point in the history
  • Loading branch information
AyushAgrawal-A2 authored Jan 25, 2024
1 parent be51e92 commit 2beb067
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ export class BookmarkCard extends WithDisposable(ShadowlessElement) {
const titleIcon = loading
? LoadingIcon
: icon
? html`<object type="image/${titleIconType}" data=${icon}>
? html`<object
type="image/${titleIconType}"
data=${icon}
draggable="false"
>
${WebIcon16}
</object>`
: WebIcon16;
Expand All @@ -125,7 +129,7 @@ export class BookmarkCard extends WithDisposable(ShadowlessElement) {

const bannerImage =
!loading && image
? html`<object type="image/webp" data=${image}>
? html`<object type="image/webp" data=${image} draggable="false">
${EmbedCardBannerIcon}
</object>`
: EmbedCardBannerIcon;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export class EmbedGithubBlockComponent extends EmbedBlockElement<
const descriptionText = loading ? '' : description;
const bannerImage =
!loading && image
? html`<object type="image/webp" data=${image}>
? html`<object type="image/webp" data=${image} draggable="false">
${EmbedCardBannerIcon}
</object>`
: EmbedCardBannerIcon;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,14 @@ export class EmbedYoutubeBlockComponent extends EmbedBlockElement<
const descriptionText = loading ? '' : description;
const bannerImage =
!loading && image
? html`<object type="image/webp" data=${image}>
? html`<object type="image/webp" data=${image} draggable="false">
${EmbedCardBannerIcon}
</object>`
: EmbedCardBannerIcon;

const creatorImageEl =
!loading && creatorImage
? html`<object type="image/webp" data=${creatorImage}>
? html`<object type="image/webp" data=${creatorImage} draggable="false">
${EmbedCardBannerIcon}
</object>`
: nothing;
Expand Down

0 comments on commit 2beb067

Please sign in to comment.