touchstate: send touchend message if widget is remove/recreated while interacted with

This commit is contained in:
jean-emmanuel 2018-02-01 15:02:56 +01:00
parent ab75124905
commit f6935548cf
2 changed files with 13 additions and 1 deletions

View file

@ -4,7 +4,8 @@
- bug fixes
- regression breaking modal's position in scrolled tab containers
- widget with a `touchAddress` set now send their touch-off message when removed or recreated while being interacted with
## 0.23.0
- bug fixes

View file

@ -37,4 +37,15 @@ module.exports = (self, options)=>{
}
}, options)
self.onRemove = ()=>{
if (sendTouchState && self.touched > 0) {
self.sendValue({
address:self.getProp('touchAddress'),
v:0,
split:false
})
}
self.__proto__.onRemove.call(self)
}
}