Bug 364845 - ctrl-shift-pageup/down should move current tab left/right. r=gavin
authorMarius Gedminas <marius@gedmin.as>
Sun, 06 Jan 2013 22:24:13 -0500
changeset 117885 0d16a92e1a41
parent 117884 ef5b1c8bfd0a
child 117886 aef27223779a
push id24129
push useremorley@mozilla.com
push date2013-01-07 16:11 +0000
Treeherderresults
reviewersgavin
bugs364845
milestone20.0a1
Bug 364845 - ctrl-shift-pageup/down should move current tab left/right. r=gavin
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -2528,16 +2528,31 @@
           if (!aEvent.isTrusted) {
             // Don't let untrusted events mess with tabs.
             return;
           }
 
           if (aEvent.altKey)
             return;
 
+          if (aEvent.ctrlKey && aEvent.shiftKey && !aEvent.metaKey) {
+            switch (aEvent.keyCode) {
+              case aEvent.DOM_VK_PAGE_UP:
+                this.moveTabBackward();
+                aEvent.stopPropagation();
+                aEvent.preventDefault();
+                return;
+              case aEvent.DOM_VK_PAGE_DOWN:
+                this.moveTabForward();
+                aEvent.stopPropagation();
+                aEvent.preventDefault();
+                return;
+            }
+          }
+
           // We need to take care of FAYT-watching as long as the findbar
           // isn't initialized.  The checks on aEvent are copied from
           // _shouldFastFind (see findbar.xml).
           if (!gFindBarInitialized &&
               !(aEvent.ctrlKey || aEvent.metaKey) &&
               !aEvent.defaultPrevented) {
             let charCode = aEvent.charCode;
             if (charCode) {