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

Don't close panel when I open a file option #18

Open
mzso opened this issue Jan 28, 2014 · 26 comments
Open

Don't close panel when I open a file option #18

mzso opened this issue Jan 28, 2014 · 26 comments

Comments

@mzso
Copy link

mzso commented Jan 28, 2014

Hello!
I think this extensin is great. One of the thing that makes it less usable then the old window is that I can't click multiple downloads to open them because the panel instantly closes.
And option to keep open the panel open until I click somewhere else or close it manually would be great for fixing this weakness.

@mzso
Copy link
Author

mzso commented Nov 12, 2014

I think it would work well, if it were possible to keep the panel (or if necessary it's window too) on top after clicking an item and then close it when I move the cursor off the panel.

@Infocatcher
Copy link
Owner

Panel closing is hardcoded:
chrome://browser/content/downloads/downloads.js

    downloadsCmd_open: function DVIC_downloadsCmd_open()
    {
      this.dataItem.openLocalFile();

      // We explicitly close the panel here to give the user the feedback that
      // their click has been received, and we're handling the action.
      // Otherwise, we'd have to wait for the file-type handler to execute
      // before the panel would close. This also helps to prevent the user from
      // accidentally opening a file several times.
      DownloadsPanel.hidePanel();
    },

It's possible to prevent this, but DownloadsPanel.hidePanel() doesn't have checks about hiding success, so something may went wrong.

Also opening of a file may move focus to user's shell, and this may be handled as panel not under cursor.

@mzso
Copy link
Author

mzso commented Nov 17, 2014

It's possible to prevent this, but DownloadsPanel.hidePanel() doesn't have checks about hiding success, so something may went wrong.

What does this mean in practice?

Also opening of a file may move focus to user's shell, and this may be handled as panel not under cursor.

Can't firefox be made to stay on top? Or maybe get focus and reopen the panel immediately after a click. That way hovering doesn't need to be dealt with.

@Infocatcher
Copy link
Owner

I made some tests... It's even not possible to just move focus back to Firefox window, probably internal focus manager don't understand, that something external is now over browser windows. But it's possible to reopen panel after small delay. Looks strange, but panel (and only panel) appears over all windows.

Can't firefox be made to stay on top?

Only using system API, for each OS, so this is difficult.

Anyway, I've added two new hidden preferences:
extensions.downloadPanelTweaker.reopenPanelAfterShowFile (disabled by default)
extensions.downloadPanelTweaker.reopenPanelAfterShowFile.delay (delay in ms)
download_panel_tweaker-0.2.3pre-fx.xpi (source).

@mzso
Copy link
Author

mzso commented Nov 18, 2014

It doesn't seem to reopen to me. I set the other program to don't get focus when I open a file but it's still not reopening.

@Infocatcher
Copy link
Owner

You should set extensions.downloadPanelTweaker.reopenPanelAfterShowFile = true first (in about:config) and probably increase extensions.downloadPanelTweaker.reopenPanelAfterShowFile.delay.

@mzso
Copy link
Author

mzso commented Nov 18, 2014

It was true. I tried 500/5000 just now, but nothing.

@Infocatcher
Copy link
Owner

Oops, I misread. I was thinking about "Open Containing Folder" item from context menu.

@mzso
Copy link
Author

mzso commented Nov 18, 2014

It works with that. I just hardly ever use that feature. :)
(Curiously only for the menu item and not for the button which does the same thing.)

Infocatcher added a commit that referenced this issue Nov 19, 2014
Infocatcher added a commit that referenced this issue Nov 19, 2014
(we may receive clicks from context menu)
(#18)
Infocatcher added a commit that referenced this issue Nov 19, 2014
Infocatcher added a commit that referenced this issue Nov 19, 2014
+ "reopenPanel.delayFallback" preference
(#18)
@mzso
Copy link
Author

mzso commented Nov 19, 2014

Hello!
I tried with latest master. (overwrote the files in the linked xpi)
It works for opening a file now too. Which is cool. I needed to increase the time because it would instantly close again at small values including default. (set it to 500ms)
I noticed some weirdness though. Apparently the panel is both on top and not in focus somehow. The only way to close it after I opened all the files I wanted is to click on one of the firefox windows clicking on the opened program, or any other program, or the taskbar doesn't do anything.
But I also doesn't have focus because I can't use the mousewheel to scroll. And it still doesn't work if I click on the panel where it doesn't do anything (seprator, border, removed download, scrollbar)
So I have to switch to the firefox window again and then back to the opened program to use it. Which adds a bit of inconvenience.

@Infocatcher
Copy link
Owner

I deeded to increase the time because it would instantly close again at small values including default. (set it to 500ms)

In latest version you can increase extensions.downloadPanelTweaker.reopenPanel.delayFallback to try open panel again and again during that time.

I noticed some weirdness though.

Yes, unfortunately things around panels and focus works strange. All looks good between Firefox windows, but looks like Firefox don't understands about external windows. :(

@mzso
Copy link
Author

mzso commented Nov 21, 2014

In latest version you can increase extensions.downloadPanelTweaker.reopenPanel.delayFallback to try open panel again and again during that time.

Cool.

Yes, unfortunately things around panels and focus works strange. All looks good between Firefox windows, but looks like Firefox don't understands about external windows. :(

Well, it's still better than having to reopen the panel manually. Maybe as a workaround a small 'x' button could be placed somewhere on the panel so at least it can be closed conveniently.

Infocatcher added a commit that referenced this issue Nov 24, 2014
(this is "Show All Downloads" button or summary progress)
(related to #18)
Infocatcher added a commit that referenced this issue Nov 24, 2014
@Infocatcher
Copy link
Owner

Well, it's still better than having to reopen the panel manually. Maybe as a workaround a small 'x' button could be placed somewhere on the panel so at least it can be closed conveniently.

It's difficult to modify interface...
Now with latest version it's possible to close panel using middle-click on "Show All Downloads" button.

@mzso
Copy link
Author

mzso commented Nov 24, 2014

Now with latest version it's possible to close panel using middle-click on "Show All Downloads" button.

This doesn't work particularly well. I still need to switch back and forth between the two windows this way. (It would be more useful for if it worked on the panel.)
Can't something like a global hotkey for escape be temporarily created to close the panel without switching back to FF? I usually try pressing esc first if I want to close something that's not a window. And it works on the panel too when FF has focus.

Ps:
Auto builds of the addon would be nice for testing like other projects on github do. eg: ytc, iaextractor

Infocatcher added a commit that referenced this issue Dec 4, 2014
@mzso
Copy link
Author

mzso commented Dec 4, 2014

Hello!
Something changed. Now firefox doesn't get back the focus and back on top when I close the panel. Apparently nothing gets the focus, but it's still better than before.
Maybe it's different because of the upgrade to FF34.

@Infocatcher
Copy link
Owner

Can't something like a global hotkey for escape be temporarily created to close the panel without switching back to FF?

Unfortunately no, only using OS API and therefore not trivial...

Auto builds of the addon would be nice for testing like other projects on github do. eg: ytc, iaextractor

Oh, I'm lazy to create many builds and don't like to place binaries in sources.

Something changed. Now firefox doesn't get back the focus and back on top when I close the panel. Apparently nothing gets the focus, but it's still better than before.
Maybe it's different because of the upgrade to FF34.

Probably... I don't change things around focus. And API like window.focus() just doesn't work in this case.

Infocatcher added a commit that referenced this issue Dec 6, 2014
@mzso
Copy link
Author

mzso commented Dec 7, 2014

@Infocatcher commented on 2014. dec. 5. 10:56 CET:

Can't something like a global hotkey for escape be temporarily created to close the panel without switching back to FF?

Unfortunately no, only using OS API and therefore not trivial...

Oh well...

One more thing. Can the middle click close thing be added to the whole panel? Middle klick doesn't seem to be doing anything on any part of the panel outside the footer, so I see no reason why not make it work on the whole panel. It'd only make it more convenient.

Infocatcher added a commit that referenced this issue Dec 8, 2014
(only with middleClickToRemoveFromPanel = false)
(related to #18)
@Infocatcher
Copy link
Owner

One more thing. Can the middle click close thing be added to the whole panel? Middle klick doesn't seem to be doing anything on any part of the panel outside the footer, so I see no reason why not make it work on the whole panel. It'd only make it more convenient.

There is disabled by default "Middle-click to remove downloads from panel" option.
I've corrected to close panel after middle-click anywhere inside panel in this case.

@mzso
Copy link
Author

mzso commented Dec 8, 2014

Great! (I wasn't aware of that option.)

Infocatcher added a commit that referenced this issue Dec 11, 2014
@mzso
Copy link
Author

mzso commented Dec 14, 2014

One issue I notices is that if I close the panel manually with middle click within the fallback time, the reopening is activated. Which it shouldn't for manual closing.
I increased the fallback value to 1500 because it was working unreliably with small values.

Infocatcher added a commit that referenced this issue Dec 14, 2014
(works anyway, but isn't documented)
(#18)
Infocatcher added a commit that referenced this issue Dec 14, 2014
Infocatcher added a commit that referenced this issue Dec 14, 2014
Infocatcher added a commit that referenced this issue Dec 14, 2014
@Infocatcher
Copy link
Owner

One issue I notices is that if I close the panel manually with middle click within the fallback time, the reopening is activated. Which it shouldn't for manual closing.

Indeed... Should be corrected now.

@mzso
Copy link
Author

mzso commented Dec 14, 2014

Just grabbed the files from the master. But the middle click reopening doesn't seem to have changed. I can get the panel to reopen multiple times with middle click.

@Infocatcher
Copy link
Owner

Strange, works fine for me after fixes.
Test version: download_panel_tweaker-0.2.3pre2-fx.xpi (source).

@mzso
Copy link
Author

mzso commented Dec 15, 2014

Tried it with setting fallback to 10000. It's inconsistent but I ofte can get it to reopen 1-3 times if I quickly middle click on it, so not for the whole ten seconds.
But if I click on the fiefox gui after opening a file it reopens all the way through, which it shouldn't and didn't do before.

@Infocatcher
Copy link
Owner

Tried it with setting fallback to 10000. It's inconsistent but I ofte can get it to reopen 1-3 times if I quickly middle click on it, so not for the whole ten seconds.

Strange, I'm unable to reproduce...

But if I click on the fiefox gui after opening a file it reopens all the way through, which it shouldn't and didn't do before.

I see. Now reopening will be canceled after mousedown anywhere inside current window.

@mzso
Copy link
Author

mzso commented Dec 15, 2014

Okay. I can't reproduce it either now. Not even with the old build.

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

2 participants