diff --git a/Userland/Libraries/LibWeb/DOM/Text.cpp b/Userland/Libraries/LibWeb/DOM/Text.cpp index 58413a15f920..824a704ebd81 100644 --- a/Userland/Libraries/LibWeb/DOM/Text.cpp +++ b/Userland/Libraries/LibWeb/DOM/Text.cpp @@ -98,7 +98,7 @@ WebIDL::ExceptionOr> Text::split_text(size_t offset) // 4. For each live range whose start node is parent and start offset is equal to the index of node plus 1, increase its start offset by 1. for (auto& range : Range::live_ranges()) { - if (range->start_container() == this && range->start_offset() == index() + 1) + if (range->start_container() == parent.ptr() && range->start_offset() == index() + 1) TRY(range->set_start(*range->start_container(), range->start_offset() + 1)); }