mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-25 09:04:53 +00: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:
committed by
Andreas Kling
parent
bc7da24fe6
commit
a740423e23
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user