mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-07-07 09:56:35 +03:00
Ladybird/Qt: Set find in page query to selected text on initial focus
This commit is contained in:
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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user