Skip to content

Commit

Permalink
improve calculation of scrollbar width
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Nov 17, 2024
1 parent d34629f commit 576c43d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
5 changes: 2 additions & 3 deletions js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -9682,10 +9682,9 @@
}
// ---------------------------------------------------------------------
function get_scrollbar_width() {
var width = filler.width();
var width = filler.outerWidth();
var container_width = self.width();
var padding = get_padding();
return container_width - width - (padding.left + padding.right);
return container_width - width;
}
// ---------------------------------------------------------------------
function get_padding() {
Expand Down
9 changes: 4 additions & 5 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Sun, 17 Nov 2024 13:13:40 +0000
* Date: Sun, 17 Nov 2024 13:32:31 +0000
*/
/* global define, Map, BigInt */
/* eslint-disable */
Expand Down Expand Up @@ -5345,7 +5345,7 @@
// -------------------------------------------------------------------------
$.terminal = {
version: 'DEV',
date: 'Sun, 17 Nov 2024 13:13:40 +0000',
date: 'Sun, 17 Nov 2024 13:32:31 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9682,10 +9682,9 @@
}
// ---------------------------------------------------------------------
function get_scrollbar_width() {
var width = filler.width();
var width = filler.outerWidth();
var container_width = self.width();
var padding = get_padding();
return container_width - width - (padding.left + padding.right);
return container_width - width;
}
// ---------------------------------------------------------------------
function get_padding() {
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 576c43d

Please sign in to comment.