thumbnail-zoom icon indicating copy to clipboard operation
thumbnail-zoom copied to clipboard

Window switches on popup, when multiple ff windows are open (linux)

Open quantumlemur opened this issue 13 years ago • 16 comments
trafficstars

If multiple firefox windows are open, and you mouseover an image in the second window, it switches back to the first (as if you had pretty alt-tab), and often doesn't show the popup. Seems to happen more often when the second window is not maximized, but would also happen sometimes when both are maximized.

I hadn't noticed it because I only very rarely have two firefox windows open at once, but when I did open two, it happened probably 90% of the time.

On linux, 1.6.1beta2.

quantumlemur avatar Feb 23 '12 01:02 quantumlemur

One further note that may be useful -- after reporting this issue, and doing other things for a bit, I then happened to use alt-tab myself, to switch to an unrelated window, and happened to see the image popup from before (that should have been shown, but wasn't, when the window changed by itself) in the alt-tab list. When I switched to it, it disappeared.

quantumlemur avatar Feb 23 '12 01:02 quantumlemur

Which version of firefox? I just tried to repro on OSX but couldn't make it happen.

dadler avatar Feb 26 '12 01:02 dadler

It was in firefox 10. I'm now on 11, and can't seem to reproduce the problem. Something that may be related that I just saw, though, is that when an image is enlarged, the firefox source window is foregrounded. That is, I had a different program open in the foreground, with firefox partially obscured behind it. When I moused over an image in firefox, it was expanded, and firefox moved to the front.

I saw the original behavior that caused me to open the issue on wikipedia, when I had an article open, and then opened a new window for a wikipedia image link. What made me wonder if the two cases were related is that I realized that the source to that particular image would be present in both windows at the same time, but that is just speculation on my part.

quantumlemur avatar Mar 04 '12 04:03 quantumlemur

I've been able to reproduce something similar on Mac:

  1. Hover over a thumb to get pop-up
  2. Drag the tab to the desktop to make it into a new window
  3. Hover over a thumb in that new window
  4. Popup appears in that window and in the original window. Focus switches to the original window (perhaps because TZP's popup now grabs focus).

The problem is likely that event listeners are still attached to the original window, and they don't realize that the events coming in are now for a different window.

Doing View > Reload in the torn-off tab seems to prevent the problem.

dadler avatar Mar 27 '12 16:03 dadler

Verified this procedure produces the problem in 1.6.0 too, except that in that version, the popup didn't grab focus, so the current window doesn't lose focus when the problem happens.

dadler avatar Mar 28 '12 04:03 dadler

I'm not able to repro this anymore on OSX in 2ec318 (post 1.6.1beta7). But after dragging out of the orig window, back in, out, I sometimes get into a situation where popups won't appear in the original window anymore, and the log indicates: 2012-04-06 21:32:59 DEBUG ThumbnailZoomPlusChrome.Overlay _needToPopDown: returning false for _originalURI= vs affectedWindow=https://www.facebook.com/dadler 2012-04-06 21:32:59 DEBUG ThumbnailZoomPlusChrome.Overlay _insideThumbBBox: adj=-99999..99999,-99999..99999 vs 1273,257: inside

dadler avatar Apr 07 '12 04:04 dadler

I get this even with one window open on Ubuntu 12.04 and Fx 14.

diversario avatar Aug 20 '12 09:08 diversario

Diversario, what do you see happening? The original report was that when hovering in one ff window, it switches to a different ff window. What do you see happening when there is only one window open (i.e. what window is it switching to if there is no other window)? Or am I misunderstanding you?

dadler avatar Aug 20 '12 16:08 dadler

What happens for me is that Fx window loses focus to something. I think it loses it to the popup, but I'm not quite sure. I have the setting to steal focus disabled, but it still happens.

diversario avatar Aug 20 '12 16:08 diversario

Now it looks like it's not happening anymore. Weird!

diversario avatar Aug 21 '12 09:08 diversario

Hmm... did you recently upgrade
  Thumbnail Zoom Plus or Firefox versions?
  On 8/21/12 2:13 AM, Ilya Shaisultanov wrote:

  Now it looks like it's not happening anymore. Weird!

    —
    Reply to this email directly or view
      it on GitHub.

dadler avatar Aug 21 '12 15:08 dadler

I did reinstall it.

diversario avatar Aug 22 '12 00:08 diversario

So, it does work now, but it looks like popup still steals the focus. It is noticeable with Gnome Shell - when you have Fx open and focus there's the Fx icon in the top panel. But once you hover over an image - icon goes away and window decoration changes to inactive.

diversario avatar Aug 22 '12 10:08 diversario

When TZP shows a popup, Linux considers it a separate window. So it'd make sense that it gets focus if Linux normally gives focus to a newly displayed window. I don't know if there's a way to prevent that.

On my version of Linux I find that a window loses focus as soon as I move the mouse out of it and onto Firefox. So I couldn't reproduce the problem, because the focus was "lost" as soon as I entered Firefox, before TZP had a chance to show a popup or "steal" it. Your window manager might have settings related to the focus of newly displayed windows, which might help.

The TZP preference "Pop-up takes focus" is more about taking focus from an input field in Firefox than taking it from other windows, so it's probably not related to the problem you're seeing.

I'm not sure what you mean by "Fx" and the "Fx icon".

I'm running Gnome in Redhat Enterprise Linux 6.2.

What version of Linux are you running?

dadler avatar Aug 23 '12 05:08 dadler

Sorry, Fx = Firefox.

I'm on Ubuntu Desktop 12.04 x64, Gnome Shell, Firefox 14.0.1

diversario avatar Aug 23 '12 09:08 diversario

Likely related to #11: After tearing off/dragging tab, popup appears in wrong window

dadler avatar Aug 27 '12 05:08 dadler