mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-09 04:25:38 +00:00
+ Dragging a tab now causes it to become the focused tab.
+ Hitting return in a name field no longer causes the focused tab to zoom in
This commit is contained in:
parent
6dbe98c096
commit
450fed677c
@ -973,13 +973,21 @@ var DragInfo = function(element, event) {
|
||||
DragInfo.prototype = {
|
||||
// ----------
|
||||
snap: function(event, ui){
|
||||
window.console.log( event, ui);
|
||||
//window.console.log( event, ui);
|
||||
// Step 1: Find the closest group by edge
|
||||
|
||||
// Step 2: Match to the to
|
||||
|
||||
},
|
||||
|
||||
// ----------
|
||||
start: function() {
|
||||
// When a tab drag starts, make it the focused tab.
|
||||
if( !this.item.isAGroup ){
|
||||
Page.setActiveTab(this.item);
|
||||
}
|
||||
},
|
||||
|
||||
// ----------
|
||||
drag: function(event, ui) {
|
||||
if(this.item.isAGroup) {
|
||||
@ -1023,6 +1031,7 @@ DragInfo.prototype = {
|
||||
this.item.reloadBounds();
|
||||
this.item.pushAway();
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@ -1041,6 +1050,7 @@ window.Groups = {
|
||||
cancel: '.close',
|
||||
start: function(e, ui) {
|
||||
drag.info = new DragInfo(this, e);
|
||||
drag.info.start();
|
||||
},
|
||||
drag: function(e, ui) {
|
||||
drag.info.drag(e, ui);
|
||||
|
@ -197,8 +197,9 @@ window.Page = {
|
||||
});
|
||||
|
||||
$(window).keyup(function(e){
|
||||
// If you hit escape or return, zoom into the active tab.
|
||||
if(e.which == 27 || e.which == 13)
|
||||
// If you hit escape or return, zoom into the active tab,
|
||||
// but only if a title or other element isn't focused.
|
||||
if((e.which == 27 || e.which == 13) && $(":focus").length == 0 )
|
||||
if( self.getActiveTab() ) self.getActiveTab().zoom();
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user