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

TinyMCE insert contact popup: unwanted focus shift #3430

Open
PeterNerlich opened this issue Feb 13, 2025 · 2 comments
Open

TinyMCE insert contact popup: unwanted focus shift #3430

PeterNerlich opened this issue Feb 13, 2025 · 2 comments
Labels
bug Something isn't working invalid This doesn't seem right needs-further-investigation This issue needs some further research/investigation prio: low Not urgent, can be resolved in the distant future.

Comments

@PeterNerlich
Copy link
Collaborator

Describe the Bug

When opening the popup to insert a contact, the focus is moved to to the submit button instead of staying on the search field. This is bad user experience, since the user likely wants to search for a different term next – submitting does not make sense and is not allowed by the system.

Steps to Reproduce

  1. Go to a page or location
  2. Click on InsertContact…
  3. Type something in the input field
  4. Change your mind and press backspace until the field is empty

Expected Behavior

The focus is still on the input field. The user can immediately type in another phrase to search for.

Actual Behavior

The focus is moved to the Submit button. The user probably doesn't notice and types in another phrase, only to find out they have to re-select the box and type it in again.

Additional Information

Should this prove difficult to solve properly with our loosely spit-glued together TinyMCE plugin + TomSelect, but are able to trigger a function the moment the focus shift happens, then as a workaround we might just check if we have a valid contact selection and if not, switch focus back to TomSelect

@PeterNerlich PeterNerlich added bug Something isn't working needs-further-investigation This issue needs some further research/investigation prio: low Not urgent, can be resolved in the distant future. labels Feb 13, 2025
@charludo
Copy link
Contributor

I can't reproduce this on FF. This:

  1. Go to a page or location
  2. Click on Insert → Contact…
  3. Type something in the input field
  4. Change your mind and press backspace until the field is empty

results in the expected behavior described above for me, only this:

  1. Go to a page or location
  2. Click on Insert → Contact…
  3. Type something in the input field
  4. press Enter
  5. the input is moved to the submit button

changes the focus, but that's on purpose for the most common workflow.

Is this Chrome-only? If not, this is really curious, because it goes against the explicit logic already in the JS code 🙈

@juliankehne
Copy link

I also wasn't able to reproduce this. I tested it on FF + Opera (Windows) and also on Chrome (Ubuntu).

@PeterNerlich PeterNerlich added the invalid This doesn't seem right label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right needs-further-investigation This issue needs some further research/investigation prio: low Not urgent, can be resolved in the distant future.
Projects
None yet
Development

No branches or pull requests

3 participants