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

fix: fix link editor's input auto-focus #1482

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

hakimio
Copy link
Contributor

@hakimio hakimio commented Oct 1, 2024

part of #1462

Custom query config is no longer needed since the default one now includes [contenteditable]. Also, the custom query breaks link editor's input autofocus.

Copy link

lumberjack-bot bot commented Oct 1, 2024

Pull request was closed ✔️

All saved screenshots (for current PR) were deleted 🗑️

@splincode splincode merged commit 0c0ce47 into taiga-family:main Oct 1, 2024
12 checks passed
@splincode
Copy link
Member

@hakimio please, don't use fork
because then the deployment won't work

@hakimio
Copy link
Contributor Author

hakimio commented Oct 1, 2024

@splincode I don't have permissions to push to this repo.

11:55:24.691: [tui-editor] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/tab-extension-import-order:refs/heads/tab-extension-import-order --set-upstream
remote: Permission to taiga-family/editor.git denied to hakimio.
fatal: unable to access 'https://github.com/taiga-family/editor.git/': The requested URL returned error: 403

@splincode
Copy link
Member

Check please, again

image

@splincode
Copy link
Member

@hakimio
Copy link
Contributor Author

hakimio commented Oct 1, 2024

I should have tested it a bit better. The issue here is not the query but the delay. Even with delay set to TUI_ANIMATIONS_DEFAULT_DURATION it doesn't autofocus consistently. If I increase it to 1s, it does but that might be way too much for most cases.
Anyway, how do you want to handle it - set delay in the demo app or the editor? If it should be set on the editor, then what should be the value? TUI_ANIMATIONS_DEFAULT_DURATION or something higher?

@splincode
Copy link
Member

Why previous query behaviour doesn't like for you?

tuiAutoFocusOptionsProvider({
            delay: TUI_ANIMATIONS_DEFAULT_DURATION,
            query: '[contenteditable].ProseMirror',
        }),
        ```

@hakimio
Copy link
Contributor Author

hakimio commented Oct 1, 2024

Because it breaks link editor's input autofocus (and most likely input autofocus in other editor's extensions).

@splincode
Copy link
Member

image

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.

2 participants