Skip to content

Commit

Permalink
fix(QSlider/QRange): first click hangs the focused state #11250
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoenescu committed Nov 10, 2021
1 parent 1a071da commit 4a18db7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ui/src/components/slider/use-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export default function ({ updateValue, updatePosition, getDragging }) {
}

function onPan (event) {
if (event.isFinal) {
if (event.isFinal === true) {
if (dragging.value !== void 0) {
updatePosition(event.evt)
// only if touch, because we also have mousedown/up:
Expand All @@ -220,7 +220,7 @@ export default function ({ updateValue, updatePosition, getDragging }) {
}
active.value = false
}
else if (event.isFirst) {
else if (event.isFirst === true) {
dragging.value = getDragging(event.evt)
updatePosition(event.evt)
updateValue()
Expand Down Expand Up @@ -250,7 +250,7 @@ export default function ({ updateValue, updatePosition, getDragging }) {
function onDeactivate () {
preventFocus.value = false

if (dragging.value === void 0) {
if (dragging.value === false) {
active.value = false
}

Expand Down

0 comments on commit 4a18db7

Please sign in to comment.