Skip to content

Commit

Permalink
Fix scroll bar check
Browse files Browse the repository at this point in the history
  • Loading branch information
jaszhix committed Jul 7, 2017
1 parent 1f6a890 commit 1f3be75
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/scripts/components/stores/tileUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export var filterFavicons = (faviconUrl, tabUrl, mode=null)=>{
} else {
return `../images/[email protected]`;
}

} else if (tabUrl && tabUrl.indexOf('chrome://') !== -1 && mode === 'settings') {
urlPart = tabUrl.split('chrome://')[1];
var chromePage = urlPart.indexOf('/') !== -1 ? urlPart.split('/')[0] : urlPart;
Expand Down Expand Up @@ -296,7 +296,12 @@ export var formatBytes = (bytes, decimals)=>{
};

export var scrollbarVisible = (element)=>{
return element.scrollHeight > element.clientHeight;
let hasVScroll = document.body.scrollHeight > document.body.clientHeight;
let cStyle = document.body.currentStyle || window.getComputedStyle(document.body, '');
return !(cStyle.overflow === 'visible'
|| cStyle.overflowY === 'visible'
|| (hasVScroll && cStyle.overflow === 'auto')
|| (hasVScroll && cStyle.overflowY === 'auto'));
};

export var searchChange = (p, tabs)=>{
Expand Down

0 comments on commit 1f3be75

Please sign in to comment.