Skip to content

Sayali: add onMouseDown preventDefault to fix Firefox timer button double-click bug#5275

Open
sayali-2308 wants to merge 1 commit into
developmentfrom
Sayali-Fix-Firefox-Timer-Bug
Open

Sayali: add onMouseDown preventDefault to fix Firefox timer button double-click bug#5275
sayali-2308 wants to merge 1 commit into
developmentfrom
Sayali-Fix-Firefox-Timer-Bug

Conversation

@sayali-2308
Copy link
Copy Markdown
Contributor

@sayali-2308 sayali-2308 commented May 15, 2026

image # Description Fixes Firefox Timer Bug: double-click (Priority Medium)

Related PRs (if any):

None — frontend only change.

Main changes explained:

  • Updated src/components/Timer/Countdown.jsx to add onMouseDown={e => e.preventDefault()} to the pause and resume/play buttons inside the circular countdown timer to fix Firefox first-click registration issue

How to test:

  1. Check out branch Sayali-Fix-Firefox-Timer-Bug
  2. npm install && npm run start:local
  3. Clear cache, log in as admin
  4. Open Firefox browser
  5. Navigate to Dashboard, find the Timer in the header
  6. Click the clock icon to open the dropdown
  7. Click ▶ to start the timer — verify it starts on first click
  8. Click ⏸ to pause — verify it pauses on first click
  9. Click ▶ to resume — verify it resumes on first click without needing a second click
  10. Verify dark mode works

Screenshots or videos of changes:

image image

Note:

Firefox has a known issue where buttons inside SVG-wrapped containers (like CircularProgressbarWithChildren) don't register onClick on the first click due to focus handling. Adding onMouseDown with preventDefault fixes this without affecting other browsers.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 2b79c33
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a07710f90bd6600084625c3
😎 Deploy Preview https://deploy-preview-5275--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

@sayali-2308 sayali-2308 changed the title Saytali: add onMouseDown preventDefault to fix Firefox timer button double-click bug Sayali: add onMouseDown preventDefault to fix Firefox timer button double-click bug May 15, 2026
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.

1 participant