diff --git a/ace-loader/plugin/templater/component_validator.js b/ace-loader/plugin/templater/component_validator.js index 93ca88bf4c0bbc10c8a65a00cb9ae875281100a3..35f00e2ec7ebbc20ec139cbe9bbe727890dd9ee8 100644 --- a/ace-loader/plugin/templater/component_validator.js +++ b/ace-loader/plugin/templater/component_validator.js @@ -1054,6 +1054,9 @@ const START_CATCH_REGEXP = /^(grab:)/; const END_CAPTURE_REGEXP = /(\.capture)$/; const TOUCH_EVENT_REGEXP = /^(touch)/; const CLICK_EVENT_REGEXP = /^(click)$/; +const LONG_PRESS_EVENT_REGEXP = /^(longpress)$/; +const DOUBLE_CLICK_EVENT_REGEXP = /^(doubleclick)$/; +const SWIPE_EVENT_REGEXP = /^(swipe)$/; const TOUCH_CAPTURE_EVENT_REGEXP = /^(?!touch).*?(\.capture)$/; /** @@ -1118,7 +1121,9 @@ function distributeEvent(out, eventName, name, val) { out.jsonTemplate.onBubbleEvents = out.jsonTemplate.onBubbleEvents || {} out.jsonTemplate.onBubbleEvents[name] = val } - } else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && CLICK_EVENT_REGEXP.test(name) && + } else if (process.env.DEVICE_LEVEL === DEVICE_LEVEL.RICH && + (CLICK_EVENT_REGEXP.test(name) || LONG_PRESS_EVENT_REGEXP.test(name) || + DOUBLE_CLICK_EVENT_REGEXP.test(name) || SWIPE_EVENT_REGEXP.test(name)) && !eventName.match(END_CAPTURE_REGEXP) && process.env.PLATFORM_VERSION === PLATFORM.VERSION6) { if (eventName.match(START_CATCH_REGEXP)) { out.jsonTemplate.catchBubbleEvents = out.jsonTemplate.catchBubbleEvents || {}