mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
Ladybird/Qt: Set find in page query to selected text on initial focus
This commit is contained in:
committed by
Andreas Kling
parent
251bb4b860
commit
8c2f1fd68f
@@ -105,6 +105,9 @@ void FindInPageWidget::focusInEvent(QFocusEvent* event)
|
||||
{
|
||||
QWidget::focusInEvent(event);
|
||||
m_find_text->setFocus();
|
||||
auto selected_text = m_content_view->selected_text();
|
||||
if (!selected_text.is_empty())
|
||||
m_find_text->setText(qstring_from_ak_string(selected_text));
|
||||
m_find_text->selectAll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user