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

With sizing property, the right click doesn't show the image options #77

Closed
abdonrd opened this issue May 27, 2016 · 4 comments
Closed

Comments

@abdonrd
Copy link
Member

abdonrd commented May 27, 2016

Description

With sizing, the right click doesn't show the image options

Expected outcome

Showing the image options.

Actual outcome

With sizing property, the right click doesn't show the image options.

without sizing with sizing
screen shot 2016-05-27 at 20 44 58 screen shot 2016-05-27 at 20 45 51

Live Demo

https://elements.polymer-project.org/elements/iron-image?view=demo

@bicknellr
Copy link
Contributor

This and #76 seem like they should be solved with a single PR: I suspect they'll be related because the solution for both of these is probably something along the lines of putting a transparent copy of the image in an img in front of the div which is handling the styling. Not critical, IMHO, but these would be nice to have.

@Westbrook
Copy link
Contributor

Indeed. I have a version of the code with this approach in it. In that people seem to be interested I'll set up the PR tomorrow when I'm back at my office. Currently, my solution involves the use of a draggable attribute so that it can be turned on and off based on user settings, but that might be overkill for the base component...?

@bicknellr
Copy link
Contributor

I looked into drag and drop events a bit; they seem pretty flaky across browsers around the form the image given to event.dataTransfer.setDragImage can be to successfully display the image, and generating a copy of the image on the fly so that the drag image is rendered the same way as the iron-image doesn't seem preferable. Also, there doesn't seem to be consensus with drag events around how to specify a file to be downloaded if the drag event ends in a native window that accepts file. I think Chrome supports 'DownloadURL' or something like that as a substitute for a MIME type in DataTransfer.setData() but other browsers I think support different names or don't have an equivalent. This would mean that there wouldn't be a way to 'fake' dragging - we'd have to rely on the native behavior.

I didn't go particularly deep into all the options here so, if drag and drop events ended up being the most reliable way to handle this, I wouldn't be that surprised. But I'm not convinced it's the best way just yet.

@abdonrd
Copy link
Member Author

abdonrd commented Feb 11, 2019

As far as I know, the Polymer Elements are not going to continue developing. So I close this issue.

@abdonrd abdonrd closed this as completed Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants