Closed Bug 364845 Opened 13 years ago Closed 7 years ago

ctrl-shift-pageup/down should move current tab left/right

Categories

(Firefox :: Tabbed Browser, enhancement)

x86
Linux
enhancement
Not set

Tracking

()

VERIFIED FIXED
Firefox 20

People

(Reporter: tuukka.tolvanen, Assigned: marius)

References

Details

Attachments

(1 file)

ctrl-shift-pageup/down should move current tab left/right, like they do in e.g. gnome-terminal
Ubuntu Bug:
https://bugs.launchpad.net/bugs/192092

Duplicates:
Bug 423734
Bug 391084

Does not work in Firefox 3.5.
Duplicate of this bug: 391084
Duplicate of this bug: 423734
Duplicate of this bug: 702960
Attached patch patch version 2Splinter Review
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?
Attachment #689087 - Flags: review?(gavin.sharp)
(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.
It looks like bug 822068 is also touching this code.
Depends on: 822068
Depends on: 656222
So ctrl-shift-home/end should move current tab to start/end?
Noticed that these key combinations have been used in Caret Browsing mode.
Flags: needinfo?(gavin.sharp)
(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?
Flags: needinfo?(gavin.sharp)
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.
Attachment #689087 - Flags: review?(gavin.sharp) → feedback+
(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.
OK, let's do this then!

Thanks again for the patch, Marius.
Assignee: nobody → marius
Keywords: checkin-needed
Attachment #689087 - Flags: feedback+ → review+
https://hg.mozilla.org/mozilla-central/rev/0d16a92e1a41
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
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.
Status: RESOLVED → VERIFIED
I'm curious about why this was not implemented via xul overlay.
(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.
You need to log in before you can comment on or make changes to this bug.