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

Disabled publish button can be bypassed by Ctrl + Enter #3107

Open
shuuji3 opened this issue Dec 26, 2024 · 1 comment
Open

Disabled publish button can be bypassed by Ctrl + Enter #3107

shuuji3 opened this issue Dec 26, 2024 · 1 comment
Labels
c: bug Something isn't working s: accepted Accepted feature / Confirmed bug

Comments

@shuuji3
Copy link
Member

shuuji3 commented Dec 26, 2024

Problem

This is a similar issue to #3085

When a post has more characters than the server limit, the "Publish" button is disabled and not clickable. But users can still try publishing the post by typing Ctrl + Enter, which always results in the error.

screenshot of compose widget with the error message "Publish failed 1. Validation failed: Text character limit of 500 exceeded"
(after typing the above keyboard shortcut)

Expected

Elk should prevent sending a new post with too many characters when typing the keyboard shortcut and no error should be shown.

@shuuji3 shuuji3 added the c: bug Something isn't working label Dec 26, 2024
@userquin
Copy link
Member

userquin commented Dec 26, 2024

You can just add a protection in the submit handler checking the disabled, it is a form and so any "enter" in the inputs will fire form submit action.

@shuuji3 shuuji3 added the s: accepted Accepted feature / Confirmed bug label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working s: accepted Accepted feature / Confirmed bug
Projects
None yet
Development

No branches or pull requests

2 participants