mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
Browser: Focus input text field in JS console by default
This commit is contained in:
parent
79a5ba58a5
commit
107db38a51
2 changed files with 7 additions and 0 deletions
|
@ -165,4 +165,8 @@ void ConsoleWidget::clear_output()
|
||||||
m_output_view->update();
|
m_output_view->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConsoleWidget::focusin_event(Core::Event&)
|
||||||
|
{
|
||||||
|
m_input->set_focus(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,9 @@ public:
|
||||||
private:
|
private:
|
||||||
ConsoleWidget();
|
ConsoleWidget();
|
||||||
|
|
||||||
|
virtual bool accepts_focus() const override { return true; }
|
||||||
|
virtual void focusin_event(Core::Event&) override;
|
||||||
|
|
||||||
RefPtr<GUI::TextBox> m_input;
|
RefPtr<GUI::TextBox> m_input;
|
||||||
RefPtr<Web::PageView> m_output_view;
|
RefPtr<Web::PageView> m_output_view;
|
||||||
RefPtr<Web::Element> m_output_container;
|
RefPtr<Web::Element> m_output_container;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue