mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Fixed compact mode not hiding sometimes and having too much trigger area
This commit is contained in:
@@ -13,17 +13,13 @@ var gZenUIManager = {
|
||||
0
|
||||
);
|
||||
|
||||
function throttle(f, delay) {
|
||||
let timer = 0;
|
||||
return function (...args) {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => f.apply(this, args), delay);
|
||||
};
|
||||
}
|
||||
|
||||
new ResizeObserver(throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe(
|
||||
new ResizeObserver(gZenCommonActions.throttle(this.updateTabsToolbar.bind(this), this.sidebarHeightThrottle)).observe(
|
||||
document.getElementById('tabbrowser-tabs')
|
||||
);
|
||||
|
||||
new ResizeObserver(gZenCommonActions.throttle(gZenCompactModeManager.getAndApplySidebarWidth.bind(gZenCompactModeManager), this.sidebarHeightThrottle)).observe(
|
||||
document.getElementById('navigator-toolbox')
|
||||
);
|
||||
},
|
||||
|
||||
|
||||
|
@@ -234,11 +234,11 @@
|
||||
transition: scale 0.07s ease;
|
||||
&[fadein='true']:not([zen-essential='true']) {
|
||||
#tabbrowser-tabs[zen-workspace-animation='previous'] & {
|
||||
animation: zen-slide-in 0.2s ease;
|
||||
animation: zen-slide-in 0.3s ease;
|
||||
}
|
||||
|
||||
#tabbrowser-tabs[zen-workspace-animation='next'] & {
|
||||
animation: zen-slide-in-reverse 0.2s ease;
|
||||
animation: zen-slide-in-reverse 0.3s ease;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -79,5 +79,13 @@ var gZenCommonActions = {
|
||||
);
|
||||
ConfirmationHint.show(document.getElementById("PanelUI-menu-button"), "zen-copy-current-url-confirmation");
|
||||
}
|
||||
},
|
||||
|
||||
throttle(f, delay) {
|
||||
let timer = 0;
|
||||
return function (...args) {
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(() => f.apply(this, args), delay);
|
||||
};
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user