Skip to content

fix: Text button in Edit PDF not working#5

Open
xyaz1313 wants to merge 1 commit intoJhaSourav07:mainfrom
xyaz1313:fix/text-button-edit-pdf
Open

fix: Text button in Edit PDF not working#5
xyaz1313 wants to merge 1 commit intoJhaSourav07:mainfrom
xyaz1313:fix/text-button-edit-pdf

Conversation

@xyaz1313
Copy link
Copy Markdown

@xyaz1313 xyaz1313 commented Apr 14, 2026

Fixes #3

Root Cause

The annotation text input textarea had transparent background and tiny height (~26px at default font size 18). On a white PDF page, the white text was completely invisible. No cleanup of drawing/textBox state on tool change caused stale state interference.

Changes

  1. Textarea visibility: Dark semi-transparent background, solid blue border, proper min-height (48px+), shadow, border-radius
  2. State cleanup: Added useEffect to clear textBox and drawing.current when tool or mode changes

Summary by CodeRabbit

  • Bug Fixes

    • Fixed stale annotation interface state persisting when switching between annotation tools or editor modes.
  • Improvements

    • Enhanced text annotation interface styling with improved visual clarity, spacing, contrast, and prominence.

… state

The annotation text input textarea had transparent background and tiny
height (~25px at default font 18), making it invisible on white PDF
pages. Also added cleanup effect to reset drawing/textBox state when
switching tools, preventing stale state from swallowing canvas clicks.

Fixes JhaSourav07#3
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 14, 2026

@xyaz1313 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
quick-pdf Ready Ready Preview, Comment Apr 14, 2026 4:27pm

coderabbitai[bot]

This comment was marked as off-topic.

Repository owner deleted a comment from coderabbitai Bot Apr 14, 2026
Repository owner deleted a comment from coderabbitai Bot Apr 14, 2026
@JhaSourav07
Copy link
Copy Markdown
Owner

Hey @xyaz1313! Thanks so much for opening this PR. The useEffect cleanup and the dark background fix are exactly what we needed to solve the visibility issue. Really appreciate the thorough debugging here!

Before we hit merge, there is one critical UI conflict we need to tweak:

The z-index issue: Our sticky toolbar at the top of the app runs at z-20. With the zIndex: 25 currently in your commit, the textarea will float over the navigation bar if a user clicks near the top edge of the page.

Required Change: Could you update the textarea style to use zIndex: 15 instead? (Pro tip: you should also force color: "#ffffff" on the textarea so that if a user selects black text, it doesn't become invisible against the new dark background!)

Once you push those updates to this branch, could you attach a quick GIF or screen recording here showing it working in your local environment? (Specifically, test adding a text box right near the top toolbar to confirm the z-index is layering perfectly).

As soon as I see the GIF and the updated commit, I'll get this merged immediately. Great work on this so far! 🚀

@JhaSourav07 JhaSourav07 added the invalid This doesn't seem right label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text Button In Edit PDF Tool is not working.

2 participants