Last Comment Bug 597989 - dragging a tab to a new window should focus that window before drop
: dragging a tab to a new window should focus that window before drop
Status: REOPENED
parity-chrome
: polish, ux-control, ux-efficiency
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: x86 All
: -- normal with 5 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on: 674925 455694
Blocks: cuts-focus
  Show dependency treegraph
 
Reported: 2010-09-20 05:04 PDT by eyal gruss (eyaler)
Modified: 2016-03-08 14:07 PST (History)
19 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
-


Attachments
Patch v1 (643 bytes, patch)
2011-06-15 15:24 PDT, Jez Ng [:int3]
bugs: review-
Details | Diff | Review
Patch v2 (2.69 KB, patch)
2011-06-27 20:57 PDT, Jez Ng [:int3]
no flags Details | Diff | Review
Patch v2 (2.32 KB, patch)
2011-06-27 21:00 PDT, Jez Ng [:int3]
no flags Details | Diff | Review
Patch v3 (5.31 KB, patch)
2011-06-29 15:00 PDT, Jez Ng [:int3]
no flags Details | Diff | Review

Description eyal gruss (eyaler) 2010-09-20 05:04:30 PDT
dragging a tab to a new window should focus that window before drop, in order to allow inserting the tab in the desired place.
Comment 1 juan becerra [:juanb] 2010-09-20 13:00:16 PDT
It's very difficult to drag and drop a tab from one window onto another, because when you do that, you have to look for the tiny bit of chrome in the other window and drop the tab there. Then you have to switch to that window and re-arrange the way you intended to.
Comment 2 Dão Gottwald [:dao] 2010-09-20 13:02:59 PDT
You can drag over the task bar to raise a different window. This is standard behavior among various window managers.
Comment 3 Mike Beltzner [:beltzner, not reading bugmail] 2010-09-28 12:56:18 PDT
While true Dao, it's an inferior UE. This bug should be fixed, but it's not a regression nor is it a blocker.
Comment 4 Jez Ng [:int3] 2011-06-15 15:24:21 PDT
Created attachment 539673 [details] [diff] [review]
Patch v1
Comment 5 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2011-06-27 11:23:06 PDT
Comment on attachment 539673 [details] [diff] [review]
Patch v1

This needs tests. Also, focusing should happen only when handling
trusted events.
And, which dom window do we want to focus? The content window or the chrome window? I would guess the content window. The patch would end up calling
focus on the content window and when on the chrome window, I think.
Comment 6 Olli Pettay [:smaug] (high review load, please consider other reviewers) 2011-06-27 11:25:08 PDT
So, would it work if you'd test that
if aVisitor.mEvent->mOriginalTarget is nsIContent, and it's
GetOwnerDoc == mDoc
Comment 7 Neil Deakin 2011-06-27 12:49:08 PDT
I don't think this should be used for every drag. It should only be applicable to tab dragging. Thus, it should be handled in tabbrowser.xml or somewhere close by.
Comment 8 Jez Ng [:int3] 2011-06-27 20:57:34 PDT
Created attachment 542368 [details] [diff] [review]
Patch v2

As per Neil's comment, I've moved the focus-changing code to the browser.xml level and made it apply only to tabs. Working on writing tests for it now.
Comment 9 Jez Ng [:int3] 2011-06-27 21:00:22 PDT
Created attachment 542369 [details] [diff] [review]
Patch v2

Last patch killed a newline.
Comment 10 Jez Ng [:int3] 2011-06-29 15:00:31 PDT
Created attachment 542966 [details] [diff] [review]
Patch v3

Patch has been updated and tests have been added.
Comment 11 Dão Gottwald [:dao] 2011-07-03 00:34:20 PDT
Comment on attachment 542966 [details] [diff] [review]
Patch v3

This patch seems to conflict with bug 455694...
Comment 12 Frank Yan (:fryn) 2011-07-03 01:40:10 PDT
(In reply to comment #11)
> Comment on attachment 542966 [details] [diff] [review] [review]
> Patch v3
> 
> This patch seems to conflict with bug 455694...

Yes. Could we wait for bug 455694 before spending more time on this?
In its latest revision, the patch for bug 455694 eschews the drag and drop API for tab dragging altogether due to performance issues.
Comment 13 Frank Yan (:fryn) 2011-07-08 22:10:46 PDT
The patch for bug 455694 now fixes this too.
Comment 14 Frank Yan (:fryn) 2011-07-27 03:21:19 PDT
Fixed by patch in bug 455694.
Comment 15 Florin Strugariu [:Bebe] 2011-09-30 08:57:08 PDT
verified on Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0
Comment 16 eyal gruss (eyaler) 2012-03-20 18:47:54 PDT
this is broken in 12.0b1, probably due to 455694 backout
Comment 17 danya.postfactum 2013-09-12 03:53:53 PDT
In Firefox 23, an accepting dragging tab window is not get focused even after drop.
Moreover, any drop (links, files, text etc) do not cause window activation (at least on Windows7) (https://bugzilla.mozilla.org/show_bug.cgi?id=332346)

Note You need to log in before you can comment on or make changes to this bug.