Repository navigation
Fix comment Post button staying disabled after pasting - #3172
Open
piotrsynowiec wants to merge 1 commit into
Open
piotrsynowiec wants to merge 1 commit into
piotrsynowiec wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approved
The focused timing fix preserves validation and has appropriate system-test coverage.
0 open findings
What changed in this PR
Fixes comment submission validity timing after paste or draft restoration.
Changes:
- Waits an additional animation frame before checking form validity.
- Adds regression coverage for content updates, drafts, and keyboard submission.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
app/javascript/controllers/form_controller.js |
Defers validity checking until Lexxy finishes refreshing. |
test/system/comment_submission_test.rb |
Tests comment submission state and related workflows. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pasting a comment into an empty composer can leave Post disabled until another key is pressed, particularly in Safari. The comment is already present and valid, so submitting with Cmd+Enter can work while the button remains disabled.
Lexxy 0.9.32 dispatches
lexxy:changebefore scheduling its validity refresh for the next animation frame.form#disableSubmitWhenInvalidschedules its check for that same frame, so the check can run before Lexxy clears the previousvalueMissingstate. Wait one additional frame before reading the existing form validity. Required-field and attachment validation remain in place.Reproduction: open a card with an empty comment composer in Safari, paste a complete comment once, and do not press another key. Before the change, Post remains disabled; with the change it enables and clicking it posts the comment successfully.
Validation:
git diff --checkpasses.Detailed browser evidence and regression checks.