ui_input: Don’t focus previous on decrement in NumberField (#41095)

This PR removes the behavior that the number_field changes focus to the
previous element when using the decrement button.

I mainly noticed this while decreasing the tab-size of a language, since
it there closes the page...

Please note that I am unsure what if any purpose this code has.
I was unable to find a use case and since it is not present in the
`increment_handler` I guess it should never have been here

---

Release Notes:

* Fixed wrongly focus previous element on number_field decrement
This commit is contained in:
ToBinio 2025-10-24 16:03:01 +02:00 committed by GitHub
parent fcd690d04c
commit 762082b15a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -369,7 +369,6 @@ impl<T: NumberFieldType> RenderOnce for NumberField<T> {
let new_value = value.saturating_sub(step);
let new_value = if new_value < min { min } else { new_value };
on_change(&new_value, window, cx);
window.focus_prev();
}
};