Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image-treatment: right-click actions on image are being suppressed #2068

Closed
ianmcburnie opened this issue May 23, 2023 · 3 comments
Closed

Comments

@ianmcburnie
Copy link
Contributor

ianmcburnie commented May 23, 2023

From Prem Periyasamy:

users can’t download images by right clicking since right click target is the image treatment div and not the img tag, so the context menu for firefox and safari does not show the save image as or open image in a new window. Also when user tried to print the page, they see a blank and not see the image.

Solution via Stephen Scaff:

Use mix-blend-mode: darken on the img. And will-change:opacity on the wrapping parent.

UPDATE: use pointer-events: none to the ::after pseudo for image-treatment instead of switching to mix-blend-mode

@agniputran
Copy link

agniputran commented May 23, 2023

will-change: opacity is known to have performance issues.
https://developer.mozilla.org/en-US/docs/Web/CSS/will-change

Hence shouldn't be added to too many DOM element, if you can add a note on the skin docs, that'd be great. Basically a word of caution kind of thing

@agniputran
Copy link

agniputran commented Jun 2, 2023

In viewitem, we found users complaining about mix-blend-mode not working well in dark mode. so i feel like you can simply add the pointer-events: none to the ::after pseudo for image-treatment instead of switching to mix-blend-mode. Anyways you would have run into performance issues with over-using will-change: opacity

@agliga agliga added this to the 17.0.0 milestone Sep 19, 2023
@agliga agliga modified the milestones: 17.0.0, 16.8.0 Sep 27, 2023
@ArtBlue
Copy link
Contributor

ArtBlue commented Oct 10, 2023

@ianmcburnie , @agniputran , is mix-blend-mode referring to this:

&::after { 
    background: rgba(0, 0, 0, 0.05);
}

So, we're getting rid of this in lieu of pointer-events: none; ? These are not related so I'm trying to figure out why they are mentioned in relation to each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants