mirror of
https://github.com/openharmony/ace_engine_lite.git
synced 2026-07-21 00:35:30 -04:00
issueNo: I4BP9Z
Description: make events non bubbling by default if api version lower than 5 Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: youzhi92 <chenyouzhi@huawei.com> Change-Id: I019414b23d3a485ffbda4379ab91e98c56ec6fa8
This commit is contained in:
@@ -137,6 +137,18 @@ bool Component::Render()
|
||||
}
|
||||
STOP_TRACING();
|
||||
|
||||
// The event bubbling mechanism is supported from API version 5, and events are bubbled by default.
|
||||
// However, it should be compatible with the migrated old application (API version 4)
|
||||
// so that it does not bubble by default.
|
||||
const int32_t supportEventBubbleApiVersion = 5;
|
||||
if (JsAppContext::GetInstance()->GetTargetApi() < supportEventBubbleApiVersion) {
|
||||
UIView *view = GetComponentRootView();
|
||||
if (view != nullptr) {
|
||||
// make events non bubbling by default.
|
||||
view->SetIntercept(true);
|
||||
}
|
||||
}
|
||||
|
||||
SetViewExtraMsg();
|
||||
|
||||
// step2: binding js object with this component
|
||||
|
||||
Reference in New Issue
Block a user