select

Better select widgets in vanilla javascript.  https://p.ce9e.org/select/demo/
git clone https://git.ce9e.org/select.git

commit
0482ec8f8bfb3c70506c9295af1c64e2aae3d1ae
parent
cc7934ce44acd8b7673454062f93e41c61bcac0d
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-08-10 20:53
fixup ee2b36a: restore "values.clientWidth is inner width of input"

Diffstat

M select.css 1 -
M values.js 4 ++--

2 files changed, 2 insertions, 3 deletions


diff --git a/select.css b/select.css

@@ -73,7 +73,6 @@
   73    73 
   74    74 .select__values {
   75    75 	position: absolute;
   76    -1 	inset: 0;
   77    76 	padding: 0;
   78    77 	margin: 0;
   79    78 	border: 1px solid transparent;

diff --git a/values.js b/values.js

@@ -27,8 +27,8 @@ export class Values {
   27    27 		// paddingTop and paddingBottom are the same
   28    28 		var paddingTop = parseFloat(style.paddingBottom);
   29    29 
   30    -1 		this.el.style.padding = style.padding;
   31    -1 		this.el.style.paddingTop = `${paddingTop}px`;
   -1    30 		this.el.style.inset = style.padding;
   -1    31 		this.el.style.top = `${paddingTop}px`;
   32    32 		this.el.style.borderWidth = style.borderWidth;
   33    33 
   34    34 		var n = this.el.children.length;