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

Hover Zoom+ for Firefox - "Save image" Action Key does not work (Version 1.0.218) #1387

Closed
isick1e opened this issue Aug 7, 2024 · 5 comments · Fixed by #1437
Closed

Hover Zoom+ for Firefox - "Save image" Action Key does not work (Version 1.0.218) #1387

isick1e opened this issue Aug 7, 2024 · 5 comments · Fixed by #1437
Labels
bug firefox Firefox-specific problem

Comments

@isick1e
Copy link

isick1e commented Aug 7, 2024

Describe the bug
On Version 1.0.218 extension for Firefox, the "Save image" Action Key does not work to save an image that is currently hovered. This functionality works fine on the Chrome extension, however.

All of the other Action Keys seem to work, aside from "Save image". I have just moved over to Firefox from Chrome, so I don't know how long this function hasn't worked.

I tried to reinstall the extension fresh with all settings reset using the "Reset" and "Save" buttons to no avail. As seen in the screenshots below, under the extension permissions, only "Access your data for all websites" is enabled by default.

I went ahead and enabled the three other Optional permissions "Download files and read and modify the browser’s download history", "Access browsing history", and "Access browser tabs". The "Save image" Action Key still doesn't download images. I have also enabled the "Enable Action Keys focus overlay message" setting to ensure the image is focused before trying to save it.

To Reproduce

  1. Go to Google.com
  2. Search "cats"
  3. Click on Images
  4. Hover over various image results and allow them to enlarge.
  5. Press the "Save image" Action Key (default S)
  6. Nothing happens, the image does not download.

In the Screenshots section below, I will show the Console outputs when using the "Save image" Action Key.

Expected behavior
Pressing the desired Action Key on a hovered image should download the image to the set download location.

Screenshots
Screenshots of the default Hoverzoom+ Extension settings on Firefox:
firefox_7r0Nfryllx

firefox_ZjzspzdlWh

Screenshots of my modified Hoverzoom+ Extension settings on Firefox to enable optional features:

firefox_Fuv10tL4rG

Screenshot of the Firefox Console (F12) and the Hover Zoom+ Extension debug console outputs when hovering over the first 3 Google image results and pressing the "Save image" Action Key.

firefox_nBHuxJhcBC

When I press the "Save image" Action Key, the Firefox Console outputs "Download: (file URL)" and the extension debug console outputs "downloadFile: [object object]" then "downloadFile granted: undefined", without downloading anything at all.

However, when I try the "Save image" Action Key on the Chrome extension, the file does download as expected, and the following Console output is generated:

chrome_SUMzQbAdax

Desktop (please complete the following information):

  • OS: Windows 10 Version 10.0.19045 Build 19045
  • Browser: Firefox
  • Version: 129.0 (64-bit)
@extesy extesy added bug firefox Firefox-specific problem labels Aug 15, 2024
@Himbosuarus
Copy link

Having the same issue I believe

@LiliaDoe
Copy link
Contributor

LiliaDoe commented Oct 26, 2024

The issue is in the onMessage function in background.js, line 98. For some reason chrome.permissions.request is not returning a promise in Firefox 131.0.3

chrome.permissions.request({permissions: ['downloads']}, function (granted) {
                cLog('downloadFile granted: ' + granted);
                if (granted) { //granted always returns undefined in firefox
                    downloadFile(message.url, message.filename, message.conflictAction, callback);
                }

@extesy
Copy link
Owner

extesy commented Oct 27, 2024

@LiliaDoe Yep, I tracked it down to the same place, but I have no idea why Firefox would behave that way. Seems like a bug in Firefox?

@LiliaDoe
Copy link
Contributor

@extesy I'd say it is as well. There is a workaround I discovered, to first check for the permission with permissions.contains, but it's not ideal

@extesy
Copy link
Owner

extesy commented Oct 28, 2024

Fixed in 02bb442. Will be available in the next release.

@extesy extesy closed this as completed Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug firefox Firefox-specific problem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants