Skip to content

Commit

Permalink
Blur input on thumb pointerUp
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed May 9, 2024
1 parent c33a529 commit 79ebc32
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/mui-base/src/useSlider2/useSliderThumb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,16 @@ export function useSliderThumb(parameters: UseSliderThumbParameters) {
return mergeReactProps(externalProps, {
'data-index': index,
id: idParam,
onPointerOver(/* event: React.PointerEvent<HTMLSpanElement> */) {
// const index = Number(event.currentTarget.getAttribute('data-index'));
onPointerOver() {
setOpen(index);
},
onPointerLeave() {
setOpen(-1);
},
onPointerUp() {
const { current: input } = inputRef;
input?.blur();
},
ref: handleRef,
style: {
...getThumbStyle(),
Expand Down

0 comments on commit 79ebc32

Please sign in to comment.