mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 13:49:05 +00:00
Browser: Ignore whitespace-only input in the JS console
This commit is contained in:
parent
a1f1369775
commit
a875713f2e
Notes:
sideshowbarker
2024-07-17 11:30:05 +09:00
Author: https://github.com/AtkinsSJ
Commit: a875713f2e
Pull-request: https://github.com/SerenityOS/serenity/pull/15305
Reviewed-by: https://github.com/linusg ✅
Reviewed-by: https://github.com/trflynn89
1 changed files with 1 additions and 2 deletions
|
@ -45,8 +45,7 @@ ConsoleWidget::ConsoleWidget()
|
|||
m_input->on_return_pressed = [this] {
|
||||
auto js_source = m_input->text();
|
||||
|
||||
// FIXME: An is_blank check to check if there is only whitespace would probably be preferable.
|
||||
if (js_source.is_empty())
|
||||
if (js_source.is_whitespace())
|
||||
return;
|
||||
|
||||
m_input->add_current_text_to_history();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue