mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 14:45:29 +00:00
+ Working on edge-cases for keyboarding around TabCandy
+ Works better with stacks (but not all the way, yet)
This commit is contained in:
parent
cc60577ba9
commit
9498388fdd
@ -120,7 +120,7 @@ window.TabItem.prototype = $.extend(new Item(), {
|
||||
}).dequeue();
|
||||
}
|
||||
|
||||
if(css.fontSize && !$container.hasClass("stacked")) {
|
||||
if(css.fontSize && !this.inStack()) {
|
||||
if(css.fontSize < minFontSize )
|
||||
$title.fadeOut().dequeue();
|
||||
else
|
||||
@ -144,6 +144,11 @@ window.TabItem.prototype = $.extend(new Item(), {
|
||||
Utils.trace('TabItem.setBounds: this.bounds is not a real rectangle!', this.bounds);
|
||||
},
|
||||
|
||||
// ----------
|
||||
inStack: function(){
|
||||
return $(this.container).hasClass("stacked");
|
||||
},
|
||||
|
||||
// ----------
|
||||
setZ: function(value) {
|
||||
$(this.container).css({zIndex: value});
|
||||
|
@ -164,7 +164,8 @@ window.Page = {
|
||||
.sort(function(a,b){
|
||||
return myCenter.distance(a[0]) - myCenter.distance(b[0]);
|
||||
});
|
||||
return matches[0][1];
|
||||
if( matches.length > 0 ) return matches[0][1];
|
||||
else return null;
|
||||
}
|
||||
|
||||
var norm = null;
|
||||
@ -185,7 +186,12 @@ window.Page = {
|
||||
|
||||
if( norm != null ){
|
||||
var nextTab = getClosestTabBy(norm);
|
||||
self.setActiveTab(nextTab);
|
||||
if( nextTab ){
|
||||
if( nextTab.inStack() && !nextTab.parent.expanded){
|
||||
nextTab = nextTab.parent.getChild(0);
|
||||
}
|
||||
self.setActiveTab(nextTab);
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user