diff --git a/driver/js/packages/hippy-vue-next/src/modules/attrs.ts b/driver/js/packages/hippy-vue-next/src/modules/attrs.ts index 7800ffabb20..5112f1775af 100644 --- a/driver/js/packages/hippy-vue-next/src/modules/attrs.ts +++ b/driver/js/packages/hippy-vue-next/src/modules/attrs.ts @@ -35,9 +35,7 @@ export function patchAttr( nextValue: NeedToTyped, ): void { // set attr when next value is not equal before value - if (nextValue === null) { - el.removeAttribute(key); - } else if (prevValue !== nextValue) { + if (prevValue !== nextValue) { el.setAttribute(key, nextValue); } } diff --git a/driver/js/packages/hippy-vue-next/src/patch-prop.ts b/driver/js/packages/hippy-vue-next/src/patch-prop.ts index 04d57d0db5d..f864b739227 100644 --- a/driver/js/packages/hippy-vue-next/src/patch-prop.ts +++ b/driver/js/packages/hippy-vue-next/src/patch-prop.ts @@ -50,7 +50,7 @@ export function patchProp( patchStyle(el, prevValue, nextValue); break; default: - if (isOn(key)) { + if (isOn(key) && !isNativeEvent(key)) { // event prop patchEvent(el, key, prevValue, nextValue, parentComponent); } else { @@ -60,3 +60,7 @@ export function patchProp( break; } } + +export function isNativeEvent(key: string) { + return ['onInterceptTouchEvent', 'onInterceptPullUpEvent'].indexOf(key) >= 0; +}