mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-26 01:44:05 +01:00
Merge pull request #672 from therealrinku/fix
feat: scroll to the active tab on click
This commit is contained in:
commit
a1d54eacf6
@ -87,7 +87,17 @@ const CollectionItem = ({ item, collection, searchText }) => {
|
||||
'item-focused-in-tab': item.uid == activeTabUid
|
||||
});
|
||||
|
||||
const scrollToTheActiveTab = () => {
|
||||
const activeTab = document.querySelector('.request-tab.active');
|
||||
if (activeTab) {
|
||||
activeTab.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
};
|
||||
|
||||
const handleClick = (event) => {
|
||||
//scroll to the active tab
|
||||
setTimeout(scrollToTheActiveTab, 50);
|
||||
|
||||
if (isItemARequest(item)) {
|
||||
dispatch(hideHomePage());
|
||||
if (itemIsOpenedInTabs(item, tabs)) {
|
||||
|
Loading…
Reference in New Issue
Block a user