aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuri Kobets <yuri.kobets@gmail.com>2023-05-14 00:46:25 +0300
committerYuri Kobets <yuri.kobets@gmail.com>2023-05-14 00:46:25 +0300
commit8139af9b70e4023aac3a639f5cbb237771455890 (patch)
tree1f3a421fa820fab18b7ffa2907ba55e98a21db28
parent03104d39e054f939b0de15c4d7eb8ba57451ba14 (diff)
get_child_by_point: search child from the end of elements listv0.7
-rw-r--r--src/render_item.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render_item.cpp b/src/render_item.cpp
index a8a2bc07..2fc8e99c 100644
--- a/src/render_item.cpp
+++ b/src/render_item.cpp
@@ -704,7 +704,7 @@ std::shared_ptr<litehtml::element> litehtml::render_item::get_child_by_point(in
el_pos.x = x - el_pos.x;
el_pos.y = y - el_pos.y;
- for(auto i = m_children.begin(); i != m_children.end() && !ret; std::advance(i, 1))
+ for(auto i = m_children.rbegin(); i != m_children.rend() && !ret; std::advance(i, 1))
{
auto el = (*i);