Last Comment Bug 364845 - ctrl-shift-pageup/down should move current tab left/right
: ctrl-shift-pageup/down should move current tab left/right
Status: VERIFIED FIXED
:
Product: Firefox
Classification: Client Software
Component: Tabbed Browser (show other bugs)
: Trunk
: x86 Linux
: -- enhancement (vote)
: Firefox 20
Assigned To: Marius Gedminas
:
Mentors:
: 391084 423734 702960 (view as bug list)
Depends on: 656222 822068
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-23 15:50 PST by Tuukka Tolvanen (sp3000)
Modified: 2014-03-21 00:58 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch version 2 (1003 bytes, patch)
2012-12-05 21:53 PST, Marius Gedminas
gavin.sharp: review+
Details | Diff | Review

Description Tuukka Tolvanen (sp3000) 2006-12-23 15:50:48 PST
ctrl-shift-pageup/down should move current tab left/right, like they do in e.g. gnome-terminal
Comment 1 Micah Gersten 2009-08-11 00:04:57 PDT
Ubuntu Bug:
https://bugs.launchpad.net/bugs/192092

Duplicates:
Bug 423734
Bug 391084

Does not work in Firefox 3.5.
Comment 2 Tony Chang (Google) 2009-09-11 10:29:07 PDT
*** Bug 391084 has been marked as a duplicate of this bug. ***
Comment 3 Tony Chang (Google) 2009-09-11 10:29:21 PDT
*** Bug 423734 has been marked as a duplicate of this bug. ***
Comment 4 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-12-05 14:59:49 PST
*** Bug 702960 has been marked as a duplicate of this bug. ***
Comment 5 Marius Gedminas 2012-12-05 21:53:58 PST
Created attachment 689087 [details] [diff] [review]
patch version 2

Version 2 of the patch, with style changes as requested by Gavin in comments of bug 702960.

Tested, works for me.

One thing I hadn't noticed before: moveTabForward/Backward leaves keyboard focus on the tab itself, which is something I didn't expect.  This explains why I had occasional difficulties scrolling web pages with Space or PgUp/PgDown lately -- keyboard focus was in the wrong place, and I didn't notice.  Any ideas how to avoid that focus change?
Comment 6 Dão Gottwald [:dao] 2012-12-06 02:14:54 PST
(In reply to Marius Gedminas from comment #5)
> One thing I hadn't noticed before: moveTabForward/Backward leaves keyboard
> focus on the tab itself, which is something I didn't expect.  This explains
> why I had occasional difficulties scrolling web pages with Space or
> PgUp/PgDown lately -- keyboard focus was in the wrong place, and I didn't
> notice.  Any ideas how to avoid that focus change?

You can remove the focus change from the moveTabBackward, moveTabForward, moveTabToStart and moveTabToEnd methods and do it directly in the keypress handler where needed.
Comment 7 :Gavin Sharp [email: gavin@gavinsharp.com] 2012-12-15 17:41:43 PST
It looks like bug 822068 is also touching this code.
Comment 8 ithinc 2012-12-15 18:11:26 PST
So ctrl-shift-home/end should move current tab to start/end?
Comment 9 ithinc 2012-12-15 18:21:21 PST
Noticed that these key combinations have been used in Caret Browsing mode.
Comment 10 :Gavin Sharp [email: gavin@gavinsharp.com] 2013-01-03 13:56:14 PST
(In reply to ithinc from comment #9)
> Noticed that these key combinations have been used in Caret Browsing mode.

Do you have a pointer to the code?
Comment 11 :Gavin Sharp [email: gavin@gavinsharp.com] 2013-01-03 14:07:20 PST
Comment on attachment 689087 [details] [diff] [review]
patch version 2

Code-wise, this looks good. I think the only suggestions I would make is that we should probably limit this behavior to Linux somehow (probably by using an #ifdef XP_GNOME like the one in browser-sets.inc).

I don't know the answers to ithinc's concerns, though (about the desired behavior for ctrl+shift+home/end, and possible conflict with other shortcuts) - we should sort that out before landing this.
Comment 12 ithinc 2013-01-03 15:52:30 PST
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #10)
> (In reply to ithinc from comment #9)
> > Noticed that these key combinations have been used in Caret Browsing mode.
> 
> Do you have a pointer to the code?

I overlooked it. ctrl-shift-home/end are used but ctrl-shift-pageup/down not.
Comment 13 :Gavin Sharp [email: gavin@gavinsharp.com] 2013-01-05 15:37:02 PST
OK, let's do this then!

Thanks again for the patch, Marius.
Comment 14 Ryan VanderMeulen [:RyanVM] 2013-01-06 19:27:39 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/0d16a92e1a41
Comment 15 Ed Morley [:emorley] 2013-01-07 08:26:37 PST
https://hg.mozilla.org/mozilla-central/rev/0d16a92e1a41
Comment 16 Cornel Ionce [QA] (:cornel_ionce) 2013-01-30 04:32:28 PST
Working on Firefox Nightly.
User Agent: Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20130129 Firefox/21.0
Build ID: 20130129030851.

Marking as verified fixed.
Comment 17 ithinc 2014-03-20 18:08:31 PDT
I'm curious about why this was not implemented via xul overlay.
Comment 18 Dão Gottwald [:dao] 2014-03-21 00:58:21 PDT
(In reply to ithinc from comment #17)
> I'm curious about why this was not implemented via xul overlay.

There's not a great chance that you'll get a reply here. Feel free to file a new bug and propose a patch.

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