Skip to content

Commit

Permalink
Merge pull request #6649 from dmarcoux/fix-tabs-on-zoom
Browse files Browse the repository at this point in the history
Fix disappearing tabs on page zoom
  • Loading branch information
bgeuken committed Dec 18, 2018
2 parents 05d86ec + 66c5f5a commit 52dfbd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/app/assets/javascripts/webui2/tabs.js
Expand Up @@ -27,7 +27,8 @@ function refreshTabs(tabList) {

$.fn.hasOverflow = function() {
var element = $(this)[0];
return (element.offsetHeight < element.scrollHeight) || (element.offsetWidth < element.scrollWidth);
// We must check that the scroll is bigger than the offset to shrink the tabs until needed (the 1 pixel difference is caused by a Firefox issue)
return (element.offsetHeight < element.scrollHeight - 1) || (element.offsetWidth < element.scrollWidth - 1);
};

$.fn.collapse = function(){
Expand Down

0 comments on commit 52dfbd6

Please sign in to comment.