mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-08 12:19:37 +03:00
PDFViewer: Prevent infinity recursion
When removing all contents from the NumericInput box in PDFViewer the callback set the (empty) text again back in the box, triggering another callback in a recursive, non-stopping fashion. Not setting the text back in the box avoids the problem.
This commit is contained in:
parent
bc7da24fe6
commit
a740423e23
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/rtobar Commit: https://github.com/SerenityOS/serenity/commit/a740423e23 Pull-request: https://github.com/SerenityOS/serenity/pull/16155
@ -29,7 +29,6 @@ NumericInput::NumericInput()
|
||||
auto new_number_opt = builder.to_string().to_int();
|
||||
if (!new_number_opt.has_value()) {
|
||||
m_needs_text_reset = true;
|
||||
set_text(builder.to_string());
|
||||
return;
|
||||
} else {
|
||||
m_needs_text_reset = false;
|
||||
|
Loading…
Reference in New Issue
Block a user