Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Page reload when "Choose Language" text box is cleared #4785

Open
6 tasks done
MaxWipfli opened this issue Dec 27, 2024 · 3 comments
Open
6 tasks done

[BUG] - Page reload when "Choose Language" text box is cleared #4785

MaxWipfli opened this issue Dec 27, 2024 · 3 comments
Labels
bug: confirmed bug Something isn't working

Comments

@MaxWipfli
Copy link

First Check

  • This is not a feature request.
  • I added a very descriptive title to this issue (title field is above this).
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Mealie documentation, with the integrated search.
  • I already read the docs and didn't find an answer.
  • This issue can be replicated on the demo site (https://demo.mealie.io/).

What is the issue you are experiencing?

In the "Choose Language" dialog, a reload is triggered when the language text box is fully cleared.

I noticed this on my fresh containerized deployment (running v2.4.1), and it can be reproduced on the demo site.

Steps to Reproduce

  1. Press "Language" in the side bar.
  2. Delete all text from the text box.

Please provide relevant logs

not relevant

Mealie Version

Details
Version: nightly
Build: 251544b
Application Mode: Production
Demo Status: Demo
API Port: 9000
API Docs: Enabled
Database Type: sqlite
Default Household: Family
Recipe Scraper Version: 15.3.3

Checks
Secure Site: Yes
Server Side Base URL: Yes
LDAP Ready: No
OIDC Ready: No
OpenAI Ready: No
Email Configured: No

Deployment

Docker (Linux)

Additional Deployment Details

not relevant

@MaxWipfli MaxWipfli added bug Something isn't working triage labels Dec 27, 2024
@michael-genson
Copy link
Collaborator

I honestly had no idea you could do this. This is probably an easy fix, I think we're refreshing any time that selection changes reactively, but we should probably only refresh once the menu is closed, or at least validate the value first. Or maybe just prevent the user from deleting the text

@MaxWipfli
Copy link
Author

Or maybe just prevent the user from deleting the text

When I wanted to search for a language, the obvious way is to just start typing as the text is already selected. However, when I did that on my phone (Firefox on Android), this still triggered the reload. So I think preventing the user from deleting the text is not the correct solution.

Also, the reload only happens when selecting a language (intended) OR when the field is empty (unintended). However, when you delete the text character by character, the reload is only triggered when the field is empty.

I guess the simple but sensible solution would just be to only reload if the value is valid, as you suggested.

@michael-genson
Copy link
Collaborator

Another option would be to just add a submit/confirm option, removing the reactivity (which doesn't really work anyway, hence why we refresh the page)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: confirmed bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants