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

Autofocus lexeme form when new entry dialog opens #1368

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Jan 10, 2025

Fixes #1328

There appears to be a bug with the autofocus attribute in svelte-ux; @hahn-kev worked around the bug and now this is working.

@rmunn rmunn self-assigned this Jan 10, 2025
Copy link

github-actions bot commented Jan 10, 2025

UI unit Tests

12 tests  ±0   12 ✅ ±0   0s ⏱️ ±0s
 4 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit ec86c19. ± Comparison against base commit bb51178.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jan 10, 2025

C# Unit Tests

104 tests  ±0   104 ✅ ±0   5s ⏱️ ±0s
 16 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit ec86c19. ± Comparison against base commit bb51178.

♻️ This comment has been updated with latest results.

@hahn-kev
Copy link
Collaborator

It probably only auto focuses when the element is created, so it may only work if the element is created after the dialog is show. But if they dialog renders the html when it's created (not shown) then it won't work. The dialog needs to render the editor when it's shown, you man be able to do that yourself with a simple #if

@rmunn
Copy link
Contributor Author

rmunn commented Jan 13, 2025

Tried using an #if to ensure the dialog would be rendered anew when loading; didn't work. Tried getting the input element and calling .focus() on it; didn't work. Will give up for now and tackle a different issue, and maybe come back to this one on another day when I might have fresher ideas.

@hahn-kev
Copy link
Collaborator

hahn-kev commented Jan 14, 2025

looks like there's a bug in svelte-ux, I've implemented a workaround for it

@rmunn rmunn force-pushed the feat/autofocus-lexeme-form-on-new-entry branch from 08ba2f2 to ec86c19 Compare January 15, 2025 16:38
@rmunn
Copy link
Contributor Author

rmunn commented Jan 15, 2025

Looks like it's working now. Rebased on top of latest develop to test, then I'll mark the PR ready for review if it continues to work after rebasing.

@rmunn rmunn marked this pull request as ready for review January 15, 2025 16:51
@rmunn rmunn requested a review from hahn-kev January 15, 2025 16:51
@hahn-kev hahn-kev merged commit 8dd28ee into develop Jan 17, 2025
17 checks passed
@hahn-kev hahn-kev deleted the feat/autofocus-lexeme-form-on-new-entry branch January 17, 2025 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

creating a new entry should focus the lexeme form input by default
2 participants