From f906635e35ae5056693e5f726c7b3edb9610c7b7 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 13 Aug 2019 14:14:53 +0200 Subject: [PATCH] Canvas Touch Support iOS. Fixes #2175 --- src/commands/view/SelectComponent.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/view/SelectComponent.js b/src/commands/view/SelectComponent.js index ad27ddf7a..154a5d33e 100644 --- a/src/commands/view/SelectComponent.js +++ b/src/commands/view/SelectComponent.js @@ -50,7 +50,7 @@ export default { const win = this.getContentWindow(); methods[method](body, 'mouseover', this.onHover); methods[method](body, 'mouseout', this.onOut); - methods[method](body, 'click', this.onClick); + methods[method](body, 'click touchend', this.onClick); methods[method](win, 'scroll resize', this.onFrameScroll); em[method]('component:toggled', this.onSelect, this); em[method]('change:componentHovered', this.onHovered, this); @@ -179,6 +179,7 @@ export default { onClick(e) { const { em } = this; e.stopPropagation(); + e.preventDefault(); if (em.get('_cmpDrag')) return em.set('_cmpDrag'); const $el = $(e.target); let model = $el.data('model');