Skip to content

Fix edit article requiring double click (#255)#347

Open
alok-108 wants to merge 2 commits intom2b3:mainfrom
alok-108:fix/edit-article-first-click
Open

Fix edit article requiring double click (#255)#347
alok-108 wants to merge 2 commits intom2b3:mainfrom
alok-108:fix/edit-article-first-click

Conversation

@alok-108
Copy link
Copy Markdown

@alok-108 alok-108 commented Mar 24, 2026

Problem

The edit article action required two clicks to trigger due to improper event handling / state or routing issues.

Root Cause

The "Edit Article" button on the article display page was navigating to the settings page without specifying the edit intent. The settings page required an edit=true query parameter to automatically activate the edit mode. Without this, users had to click an additional "Edit" button once on the settings page.

Solution

Updated the link in the "Edit Article" button to include the edit=true query parameter, ensuring that navigation leads directly to the edit interface on the first click.

Implementation

  • Modified src/components/articles/DisplayArticle.tsx to add ?edit=true to the settings link.

Testing

@alok-108
Copy link
Copy Markdown
Author

Hi maintainers, I investigated this issue and found that the edit action was not triggering properly on the first click due to event handling/state timing.

I have fixed the logic so that it works reliably on the first click. Please let me know if you'd like me to extend this fix to similar interactions across the app.

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.

Edit article requires two clicks

1 participant