mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-03 08:28:38 +00:00
Implement scrollbar state management and adjust overflowing behavior in Zen UI components
This commit is contained in:
@@ -29,6 +29,7 @@ var gZenUIManager = {
|
||||
});
|
||||
|
||||
window.addEventListener('TabClose', this.onTabClose.bind(this));
|
||||
this.tabsWrapper.addEventListener('scroll', this.saveScrollbarState.bind(this));
|
||||
},
|
||||
|
||||
updateTabsToolbar() {
|
||||
@@ -68,10 +69,13 @@ var gZenUIManager = {
|
||||
this._scrollbarState = this.tabsWrapper.scrollTop;
|
||||
},
|
||||
|
||||
restoreScrollbarState() {
|
||||
this.tabsWrapper.scrollTop = this._scrollbarState;
|
||||
},
|
||||
|
||||
onTabClose(event) {
|
||||
this.updateTabsToolbar();
|
||||
this.tabsWrapper.scrollTop = this._scrollbarState;
|
||||
this._scrollbarState = 0;
|
||||
this.restoreScrollbarState();
|
||||
},
|
||||
|
||||
openAndChangeToTab(url, options) {
|
||||
|
Reference in New Issue
Block a user