From cd08b3b6f49507a1b0c2b0bce3e9d082beb1ded1 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Wed, 20 Aug 2025 11:46:57 +0200 Subject: [PATCH] LibWeb: Reset cursor blink cycle, even if there's no viewport paintable If we programmatically set a selection in an editable element during document load, we failed to start the cursor blink cycle timer. The cursor blink logic already takes care of us not having the paintable yet, so start it unconditionally. --- Libraries/LibWeb/DOM/Range.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/DOM/Range.cpp b/Libraries/LibWeb/DOM/Range.cpp index 98030b1518b..448f8e470df 100644 --- a/Libraries/LibWeb/DOM/Range.cpp +++ b/Libraries/LibWeb/DOM/Range.cpp @@ -104,8 +104,8 @@ void Range::update_associated_selection() return; auto& document = m_start_container->document(); + document.reset_cursor_blink_cycle(); if (auto* viewport = document.paintable()) { - document.reset_cursor_blink_cycle(); viewport->recompute_selection_states(*this); viewport->set_needs_display(); }