emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
233 stars 47 forks source link

Fix Focus Behavior after 1.20.4 Changes #389

Closed shartte closed 8 months ago

shartte commented 8 months ago

Th problem I observe in AE2 in 1.20.4. is: When the AE2 search widget has focus, and I click on EMIs search widget, the AE2 search box will remain focused.

This is due to Vanilla now maintaining the current focus widget in Screen (well, AbstractParentElement, really). This needs to be cleared when we move Focus to the EmiSearchWidget.

I tested this fix in the AE2 dev-environment (with moving focus between the two search-fields via clicks, and unfocusing by clicking elsewhere in the screen).

I also tested the creative inventory, where the creative search field maintain its visual focus state when EmiSearchWidget is focused, while inputs are correctly routed to EMI.