From 25e1ea013856bdbf38615fbfeed147e5112356b7 Mon Sep 17 00:00:00 2001 From: ariellalgilmore Date: Wed, 15 Jan 2025 13:58:59 -0800 Subject: [PATCH] fix(slider-multithumb): focus glitch --- .../slider-multithumb/examples/js/slider-multithumb.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/patterns/slider-multithumb/examples/js/slider-multithumb.js b/content/patterns/slider-multithumb/examples/js/slider-multithumb.js index fcb2ae6288..ac8172edf6 100644 --- a/content/patterns/slider-multithumb/examples/js/slider-multithumb.js +++ b/content/patterns/slider-multithumb/examples/js/slider-multithumb.js @@ -62,8 +62,8 @@ class SliderMultithumb { this.svgNode.setAttribute('width', this.svgWidth); this.svgNode.setAttribute('height', this.svgHeight); - this.minSliderFocusNode.setAttribute('y', this.focusY); - this.maxSliderFocusNode.setAttribute('y', this.focusY); + this.minSliderFocusNode.setAttribute('y', Math.max(2, this.focusY)); + this.maxSliderFocusNode.setAttribute('y', Math.max(2, this.focusY)); this.minSliderFocusNode.setAttribute('width', this.focusWidth); this.maxSliderFocusNode.setAttribute('width', this.focusWidth); this.minSliderFocusNode.setAttribute('height', this.focusHeight);