diff --git a/assets/index.less b/assets/index.less index 1fab5e271..4eb1e041c 100644 --- a/assets/index.less +++ b/assets/index.less @@ -186,9 +186,8 @@ } &-track-draggable { - z-index: 1; - box-sizing: content-box; - background-clip: content-box; + border-top:0; + border-bottom: 0; border-right: 5px solid rgba(0, 0, 0, 0); border-left: 5px solid rgba(0, 0, 0, 0); transform: translateX(-5px); diff --git a/src/Tracks/Track.tsx b/src/Tracks/Track.tsx index 86bdfcc4c..6ca7202f6 100644 --- a/src/Tracks/Track.tsx +++ b/src/Tracks/Track.tsx @@ -18,7 +18,6 @@ export default function Track(props: TrackProps) { const { direction, min, max, disabled, range } = React.useContext(SliderContext); const trackPrefixCls = `${prefixCls}-track`; - const draggableTrackPrefixCls = onStartMove ? `${prefixCls}-track-draggable` : null; const offsetStart = getOffset(start, min, max); const offsetEnd = getOffset(end, min, max); @@ -56,11 +55,10 @@ export default function Track(props: TrackProps) { return (
{ ); errorSpy.mockRestore(); }); + + it('Track should have the correct thickness', () => { + const { container } = render( + , + ); + + const { container: containerVertical } = render( + , + ); + expect(container.querySelector('.rc-slider-track-draggable')).toBeTruthy(); + expect(containerVertical.querySelector('.rc-slider-track-draggable')).toBeTruthy(); + }); });