Skip to content

Commit 646bd8e

Browse files
authored
fix(TouchPan): emit the final event when the directive is destroyed while active quasarframework#7225 (quasarframework#7226)
1 parent 4e5fb37 commit 646bd8e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ui/src/components/slider/slider-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export let SliderMixin = {
106106
},
107107

108108
editable () {
109-
return !this.disable && !this.readonly
109+
return this.disable !== true && this.readonly !== true
110110
},
111111

112112
decimals () {

ui/src/directives/TouchPan.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,11 @@ export default {
381381
const ctx = el.__qtouchpan_old || el.__qtouchpan
382382

383383
if (ctx !== void 0) {
384+
// emit the end event when the directive is destroyed while active
385+
// this is only needed in TouchPan because the rest of the touch directives do not emit an end event
386+
// the condition is also checked in the start of function but we avoid the call
387+
ctx.event !== void 0 && ctx.end()
388+
384389
cleanEvt(ctx, 'main')
385390
cleanEvt(ctx, 'temp')
386391

0 commit comments

Comments
 (0)