mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:17:44 +00:00
LibWeb: Make BrowsingContext::reset_cursor_blink_cycle() more robust
If the browsing context text cursor has become invalid for whatever reason, don't try to repaint its associated node.
This commit is contained in:
parent
5b8290dfa3
commit
8aa24c45dd
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ void BrowsingContext::reset_cursor_blink_cycle()
|
|||
{
|
||||
m_cursor_blink_state = true;
|
||||
m_cursor_blink_timer->restart();
|
||||
m_cursor_position.node()->layout_node()->set_needs_display();
|
||||
if (m_cursor_position.is_valid() && m_cursor_position.node()->layout_node())
|
||||
m_cursor_position.node()->layout_node()->set_needs_display();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/browsers.html#top-level-browsing-context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue