From 3523c95ca1f32670824c4c635697ea4ef3e324d5 Mon Sep 17 00:00:00 2001 From: ilikethese Date: Mon, 9 Oct 2023 16:06:33 +0800 Subject: [PATCH] fix(dom): handle event by platform --- dom/src/dom/dom_node.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dom/src/dom/dom_node.cc b/dom/src/dom/dom_node.cc index 01d5379ae5e..4e569582c28 100644 --- a/dom/src/dom/dom_node.cc +++ b/dom/src/dom/dom_node.cc @@ -322,9 +322,13 @@ LayoutResult DomNode::GetLayoutInfoFromRoot() { void DomNode::TransferLayoutOutputsRecursive(std::vector>& changed_nodes) { auto not_equal = std::not_equal_to<>(); bool changed = layout_node_->IsDirty() || layout_node_->HasNewLayout(); +#ifdef __ANDROID__ + bool trigger_layout_event = true; +#else bool trigger_layout_event = not_equal(layout_.left, layout_node_->GetLeft()) || not_equal(layout_.top, layout_node_->GetTop()) || not_equal(layout_.width, layout_node_->GetWidth()) || not_equal(layout_.height, layout_node_->GetHeight()); +#endif layout_.left = layout_node_->GetLeft(); layout_.top = layout_node_->GetTop();