lusakasa / saka-key

A keyboard interface to the web
https://key.saka.io
MIT License
862 stars 70 forks source link

After download on page hints don't work #65

Open plitter opened 7 years ago

plitter commented 7 years ago

To reproduce: Go to https://www.archlinux.org/download/ and use hints to download the torrent file for example, then try to use hints afterwards. Other things like closing said window also doesn't work.

Version of firefox: 58.0a1 (2017-10-02) (64-bit)

eejdoowad commented 7 years ago

I'm using Firefox 57 on OSX. On Firefox, downloading using link hints doesn't work because it's currently implemented as a synthetic click on the target link with the alt key pressed. I need to add a special logic path for Firefox. However, link hints should continue to work. I can't reproduce this, but I'll keep an eye out.

plitter commented 7 years ago

When I said using hints to download I meant using f and then the corresponding hint. Basically clicking the link in with the mouse I guess. I'm not doing anything special with synthetic click awith alt key :) I'll try with the normal installed firefox soon. [Edit] I was able to reproduce this behavior in 55.0.3 (64-bit), the "normal" firefox. I'm on Arch Linux.

plitter commented 7 years ago

Also reproduced on windows 56.0 64bit on windows.

eejdoowad commented 7 years ago

I see what you mean now. This is a bizarre bug. For some reason, downloading a file breaks the content script context. Content scripts maintain a messaging port to communicate with the background page. This port is forcibly disconnected when you download a file. I suspect switching to the browser.downloads API will correct this. Normally ports only disconnect when you navigate to a new page.

plitter commented 7 years ago

Great, looking forward to testing this plugin again when this bug is fixed :)